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.
I create a "Scala Application Main Object", producing this code: object newMain { /** * @param args the command line arguments */ def main(args: Array[String]) = { println("Hello, world!") } } And then hit Shift-F6 and a dialog pops up: Class "newMain" does not have a main method. Hitting F6 runs the main class file normally (whichever the project is configured with).
Have you checked the project properties setting: Right click on project node, choose "Properties", then click "Run", there is a field "Main Class:"
To clarify, running the main class is fine, I referred to the feature "Run File" typically available in java projects, where you only have to open any source file declaring a main method, and do Shift-F6, which invokes it. At least you acknowledge the issue? Or is it something that happens only to me?
Fixed: rev/8fe006d9f245 Thanks for patch from Ståle Undheim <staale@netbeans.org>
Shift-F6 broken on individual files in 7.0.1. Currently only reproducible with a manually added file, as the Wizard for creating a "Scala Application Main Object" does never finish. (I didn't create a ticket for this)
Workaround: Restart the IDE. As no new comments has been added for over a year I would like to confirm that the bug still exists in nbscala-nb7.2-s2.10.0-v0.2 and Netbeans 7.2.