This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
If a Java file is opened using File -> Open File... which is outside of any Netbeans project, there is no way to compile that source file into a class file without leaving the IDE and using the command line. This could be supported by a context menu item on the file's tab in the editor.