Results 1 to 16 of 16
- 04-09-2012, 09:58 PM #1
Unsupported major.minor version 51.0
hello everybody
I'm developing some applets with java build 1.7.0_03-b05. everything work fine when I start the applets inside eclipse or with the appletviewer. the problem arise when i start the applets with the browsers firefox or internet explorer I got this error:
java.lang.UnsupportedClassVersionError: HelloSwingApplet : Unsupported major.minor version 51.0
Ok, I can avoid this error when I set my java environment to 1.6. But my question is, how can I configure my browsers to use java 1.7?
- 04-09-2012, 11:52 PM #2
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,547
- Rep Power
- 11
Re: Unsupported major.minor version 51.0
Make sure you have the latest java runtime installed as well as the JDK.
- 04-10-2012, 12:46 AM #3
Moderator
- Join Date
- Jul 2010
- Location
- California
- Posts
- 1,609
- Rep Power
- 5
Re: Unsupported major.minor version 51.0
This point is null if you are relying on classes from within 1.7: pass the minor version of the JRE capable of running your app to javac at compile time - very useful to allow users without the latest JRE install (my guess for 1.7 at this time would be many) to run apps compiled on newer JDK versions.
- 04-10-2012, 06:09 PM #4
Re: Unsupported major.minor version 51.0
- 04-10-2012, 07:33 PM #5
Re: Unsupported major.minor version 51.0
Why do they call it rush hour when nothing moves? - Robin Williams
- 04-11-2012, 09:50 PM #6
Re: Unsupported major.minor version 51.0
hello db
I've quite a lot of experience finding stuff with google, but this time I couldn't find the plugins you posted. Could you please help with an url/link?
- 04-11-2012, 11:16 PM #7
Re: Unsupported major.minor version 51.0
Why do they call it rush hour when nothing moves? - Robin Williams
- 04-12-2012, 08:33 AM #8
Re: Unsupported major.minor version 51.0
I couldn't find no plugins for firefox or ie in the url. Sorry, but I need some "Java and Firefox for Dummies" instructions.
- 04-12-2012, 11:01 AM #9
Re: Unsupported major.minor version 51.0
All you have to do is download and install the Java 7 JRE. (I installed the JDK, but that shouldn't be needed.) You may need to check the settings in the Java control panel / Advanced -> default Java for Browsers (should be checked by default; if not then check it).
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 04-13-2012, 09:56 AM #10
Re: Unsupported major.minor version 51.0
can you please tell me where a can download the plugins manually? the hint with the advanced checkbox didn't work.
- 04-13-2012, 12:26 PM #11
Re: Unsupported major.minor version 51.0
I didn't download any plugin separately. Just the JDK.
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 04-14-2012, 08:50 AM #12
Member
- Join Date
- Apr 2012
- Posts
- 2
- Rep Power
- 0
Re: Unsupported major.minor version 51.0
Downloading just the JDK will give you the JRE with it, but if you are using JDK 7 and its corresponding JRE, you won't get the error message, but everyone else who tries to view your applets will. There is a class version change (from 50 to 51) between 6 and 7, and 7 is offered automatically to no one; it is for developers to be a step ahead for the next platform. This is only a problem if you want your applets to work for the general public now, because your browser and the java install/version test on Oracle's site will mark 6.31 as the latest. That kind of makes your JDK 7 that works on your computer basically useless for anyone else, so if that's ok with you, great. Otherwise, you will need to switch back until JRE 6 update 31 is not found to be the latest for everyone. I made sure to uninstall all other versions (I also had 64bit versions) before downloading and reinstalling. I also had to recompile my apps to make them work.
The specific version change and expected conflict is noted in Oracle's documentation linked from the JDK 7 download area.
- 04-14-2012, 10:06 PM #13
Re: Unsupported major.minor version 51.0
- 04-15-2012, 07:35 AM #14
Member
- Join Date
- Apr 2012
- Posts
- 2
- Rep Power
- 0
Re: Unsupported major.minor version 51.0
The reason can have multiple causes. 64bit system? If so, check the 64bit version of Internet Explorer, and see if it works there. That was the only place I had my applets working during this problem. Checking its add-ons, it was using the version 7. Checking the add-ons in my default Internet Explorer (32bit), it was using 6, as were all other browsers on my computer (FF, Opera, I never checked Chrome since I knew by then it wasn't a specific browser's problem). Checking program files proved there were both versions installed on my computer. I was also using JGrasp, and it wasn't easy enough for me to figure out which it was compiling with, but it was obviously v7. Java console for 32 bit JDK does not show up normally after installing 64bit (I also had both) with the Control Panel GUI. Use this command: C:\Program Files (x86)\Java\jre6\bin\javacpl.exe, click the Java tab up top, and then the View button and see if 2 versions are showing up. I never was able to get FF to update to version 7 (it probably would have if I tried it after uninstalling all versions first, but by the time I did that, I was going to v6 and not playing around). Add all of these factors plus the fact that FF blocked v 6 update 30 a few weeks ago, and I think every application's functions just wouldn't play nice together anymore. Even Oracle's site warns against 64bit installs without 32 bit being installed also (and first).
I can't see your system, but I believe if you look hard enough, you will find that the browsers aren't using version 7 even though you have it installed. Whichever you want to use, it is easiest to just uninstall all java and then go with the JDK you want.
- 04-15-2012, 09:54 AM #15
Re: Unsupported major.minor version 51.0
Bingo! I removed my firefox 32-bit installation and after installing the 64-bit version I can see that java 1.7.0_03 is recognized inside the browser and also my applets runs without changing any runtime environment or have to install additional plugins. The problem is solved but for further work I've to keep in mind that my applet could make problems on other platforms not having the jre 7 installed.
Thank you!
- 04-15-2012, 10:35 AM #16
Similar Threads
-
Minor AWT drawing issue
By snaquetime in forum New To JavaReplies: 6Last Post: 06-02-2011, 12:01 AM -
Shall we skip Unsupported class version error?
By makpandian in forum New To JavaReplies: 1Last Post: 04-21-2011, 01:11 PM -
Some minor doubts about JAVA
By naveenpaul1987 in forum New To JavaReplies: 9Last Post: 03-16-2011, 11:53 AM -
Minor of a matrix (LinkedListArray)
By sehudson in forum New To JavaReplies: 1Last Post: 03-08-2011, 07:27 AM -
Minor of a matrix
By sehudson in forum New To JavaReplies: 3Last Post: 02-21-2011, 08:12 PM


LinkBack URL
About LinkBacks
Reply With Quote


Bookmarks