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.
Dev build. Make a new j2seproject app and specify a main class with no package name. Created in the correct location but starts with package ; public class Whatever {...} Note that J2SEProjectGenerator just gets a JavaDataObject (from Templates/Classes/Main.java) and calls createFromTemplate on it, so the problem seems to be in JavaDataObject.
Yes, it seems as a bug in the JavaDataObject or the javamodel Resource.setPackageName(). The JDO.handleCreateFromTemplate () was not changed, probaly Resource.setPackageName () is wrong.
Hm, I just tried it and it worked correctly, but I did not find any related change neither in JavaDataObject nor in ResourceImpl. Reopen if it is still reproducible.
Works for making a new class from template, but not for new j2seproject.
It is handled by JDO. It seems to work fine in the trunk build.
It does work in a fresh user dir. My customized template for a main class had package __PACKAGE__; public class __NAME__ { .... } which used to work fine but apparently no longer does. When I change it to package Templates.Classes; public class Main { .... } then it is OK. So minor settings incompatibility which we will presumably not bother fixing.
Wrong resolution however.
More precise result.