0

I have Microsoft Windows Server 2003. I installed JDK 1.7.0 and JDK 1.6.0 but the version shown by Java version is 1.4. I can't find any JDK 1.4 or JRE 1.4 folder in C:\program files\java\. I also changed JAVA_HOME to C:\program files\java\jre1.7.

I referred to this thread but didn't help. I know the issue is with JER/JDK compatibility but can't help myself. I can compile and run my application in Netbeans but can't run this application independently. What might be the issue?

java.lang.UnsupportedClassVersionError:MYCLASSPackage/ClassName (Unsupported major.minor version 50.0)
Community
  • 1
  • 1
kinkajou
  • 3,664
  • 25
  • 75
  • 128
  • @unhillbilly I used %JAVA_HOME%\bin\java.exe" and It worked there was java already installed in system32 folder :( . – kinkajou Jan 20 '12 at 07:50

1 Answers1

3

How are you running your "application independently"? java.exe ...?

Specifically point to the version of Java that you'd like to use. You're probably working against a copy of "java.exe" that exists in the C:\Windows\System32\ folder, and is using the registry to point to the full 1.4 version. I could detail this further, but probably couldn't do better than what is already described at http://mindprod.com/jgloss/javaexe.html#MULTIPLES.

ziesemer
  • 27,712
  • 8
  • 86
  • 94