I have also posted this question on the netbeans forums - hoping for maximum exposure.
I am developing an application using NetBeans RELEASE67 and maven-nbm plugin. I use Java WebStart to deploy.
My users have a mixture of java 1.6 and java 1.5
My java 1.5 users are unable to use the software; on startup the software calls TopComponent.findInstance() and this results in
java.lang.NoClassDefFoundError: javax/swing/GroupLayout$Group
I can see that javax.swing.GroupLayout 开发者_StackOverflow社区is new to java 1.6+, and am stumped that the basic TopComponent code is so tied to java 1.6.
How can I get a NetBeans platform app to run under Java 1.5?
I will try to rewind to RELEASE65 in the hope this will solve the problem. Any suggestions?
Thanks alot.
Are you including swing-layout.jar in your deployment? You'll need that for running on pre-Java 6 platforms.
Apologies for the slow response.
My problem was that I was running the IDE under Java 6, and Matisse had created all the layouts using the java6 only class javax.swing.GroupLayout.
I didn't notice the problem until I had to run the software on the minoritiy of my clients who are stuck on Java 1.5
This is easily fixed using the following procedure
- Open the TopComponent in the 'Inspector' window
- Right-click on the root node (Form TopComponent). Select the 'Properties Windo
- In the properties window there is a line about 'Layout Generation Style'. The choice is between
- Standard Java 6 Code
- Swing Layout Extensions Library
- Select the latter option.
- Rebuild
精彩评论