This content has been marked as final. Show 6 replies
4) I've removed Java Studio and reinstalled it but still get the same error.Have you also ensured that you are not reusing the user directory from previous install? Please take a look at http://blogs.sun.com/karthikr/entry/jse_directories
If it does not help, are there any error messages in the ide log file (found at <userdir>/var/log/messages.log)?
- Have you considered using NetBeans as an alternative to JSE8.1. From http://forum.java.sun.com/thread.jspa?threadID=5192837 :
Java Studio Enterprise 8.1 is itself built on top of NetBeans version 5.0. NetBeans is an ide developed as opensource at www.netbeans.org; it is extensible ide and so add-on modules can be developed to run on top of netbeans. And that is what JSE8.1 does; JSE 8.1 is NetBeans 5.0 plus several add-on modules (like UML etc). The latest stable version of NetBeans is 5.5.1 and NetBeans 6.0 is currently under development with milestone 10 being the latest release. Home page: www.netbeans.org Download: http://www.netbeans.info/downloads/index.php (From the main page, you can also download several packs which are addons that provide various functionality). Docs: http://www.netbeans.org/kb/index.html Docs on EE apps: http://www.netbeans.org/kb/trails/java-ee.html Further community resources (mailing lists, issue tracking etc) : http://www.netbeans.org/community/index.html wiki.netbeans.org NetBeans download is free. And since it is developed as an opensource project, the source is freely available under CDDL license.
Your reply sparked me to go check the message logs and indeed I found the error. Root cause: I was using JDK 1.5 as my default but compiling one of the custom component projects under JDK 1.6. So when the IDE tried to reload the Custom component it was failing with the message I described but in the logs there were "java.lang.UnsupportedClassVersionError: Bad version number in .class file" exceptions all over the place! A little digging on that error and I had my solution. Migrated the default JDK the IDE uses to 1.6 and things are back to normal! Thanks again for the reply I really appreciate it!
I received the same message, even after installing a clean Netbeans 6.1. Running the "Clean and Build Main Project" command in the Build menu fixed it.
This is my first NetBeans project so I thought I'd share my lessons learned.
I too was unable to add Beans from the palette. The error message said that the class was not in the project's classpath.
I looked in the messages log (located in Userdir/var/log) and saw this same error "java.lang.UnsupportedClassVersionError: Bad version number in .class file".
You can see your Userdir from the 'About' item in the 'Help' menu.
My fix was to use 1.6 as my platform and do a rebuild.
The IDE does not let you change platforms dynamically so you have to shut down and edit a config file.
In order to specify a different platform you can edit this config file <NetBeansHome>/etc/netbeans.conf
"netbeans_jdkhome" specifies the platform.
This is my setting
Hope this saves someone the 4 hours that I spent.
Same problem. Did a clean and build of the project. It worked! Thanks guys. :D
...to add to the last post: I changed to 1.6 as well Before doing the clean and build. Problem solved!