If ergonomics is enabled, and you open Tools > Java Platforms, there are no platforms listed at all. If you click Add
Platform you get an exception DataObject.find() called on null.
Enabling Java support fixes this. Not sure if this is a problem for ergonomics or the Java Platform module, but it's
Generating NPE is definitely problem of the code.
Well, yes, but if Java support is disabled, why is there a Tools > Java Platforms menu at all?
Potentially because of bug 159923, but I am not sure.
I have just tried build from today's trunk and the menu item is not there. Closing as works for me unless someone
provides steps to reproduce (having java disabled and have the menu item there).
Created attachment 80766 [details]
Module suite demonstrating the problem
Reopenning after Tim provided the test cluster.
Created attachment 80773 [details]
Sorry, try this one
Try the attached suite. It does cause the Java Platforms menu item to appear.
Create a directory such as C:\fake (the platform install implementation recognizes only dirs named "fake" as java
Skip the empty wizard panel, and press Finish. The exception below is thrown.
The culprit is that PlatformsCustomizer tries to look up
Templates/Services/Platforms/org-netbeans-api-java-Platform/javaplatform.xml in the system fs and assumes it will exist,
but it does not.
A bigger problem which I will file separately is that while the Java Platforms menu item is visible, in fact if you
browse to your JDK, it is not recognized because the modules the recognize other Java Platforms are not enabled.
java.lang.IllegalArgumentException: Called DataObject.find on null
The Templates/Services/Platforms/org-netbeans-api-java-Platform/javaplatform.xml is in
The action is in
which does not have any dependency on j2seplatform one. You need to fix your module dependencies or get ready for the
Pavel will help you with the fix in case you want his help.
I will fix the module dependencies.
The dependency is in the other direction. Investigating.
You can make the dependency bidirectional by using OpenIDE-Module-Provides/Needs/Recommends. Or you can just prevent
the NPE. What is correct depends on you Java guys. I can imagine that JavaCard development module could easily run
without any JavaSE platform, although the current code seems to rely on JavaSE platform being around.
I have a patch almost ready that moves the layer registration and couple of files "up" in the dependency chain (from
j2seplatform to java.platform.
The only problem I have now not to screw something ;-) I will try to finish and commit the move unless there are any
BTW I would like to know the reason why the template file was in one module and its wizard iterator in another - if
there was some reason to have it like this my move might break something that I am not aware about.
> although the current code seems to rely on JavaSE platform being around.
It doesn't, although I think users might find it a little confusing if Java support is enabled but the IDE doesn't
recognize a JDK install.
Pushed to jet-main as changeset: 128757:c121cd47a5b6
Ergonomics keyword does not mean that the bug was caused by bug in the ergonomics modules. It means that without
ergonomics you would not encounter it which I think is true since you would have the whole java cluster enabled whatever
would Tim do with JavaCard ... The bug is now correctly in category java/platform - this is where the bug is (was).
Any help with the following failure is welcome:
I have tried to move the template and its display name in the bundle ... did I do it the wrong way?
I apologize for the question. I have wrong localizing bundle there ... reopenning.
And fixed again in changeset : 128939:fa922dbd78dc in jet-main.
*** Issue 162800 has been marked as a duplicate of this issue. ***