Java version mismatch

Bawer
Bawer used Ask the Experts™
on
Hi Experts,

Need an urgent solution,

I had updated the solaris recent pacakges in one of the server having Java apps, those patches include the Java fixes too, after the patch the apps are not getting started and throw the following errors.  I will be pleased to have your help. the current Java version is 1.5.

[Loaded java.lang.UnsupportedClassVersionError from /usr/jdk/instances/jdk1.5.0/jre/lib/rt.jar]
[Loaded sun.misc.ClassFileTransformer from /usr/jdk/instances/jdk1.5.0/jre/lib/rt.jar]
[Loaded java.io.IOException from /usr/jdk/instances/jdk1.5.0/jre/lib/rt.jar]
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
[Loaded java.lang.Shutdown from /usr/jdk/instances/jdk1.5.0/jre/lib/rt.jar]
[Loaded java.lang.Shutdown$Lock from /usr/jdk/instances/jdk1.5.0/jre/lib/rt.jar]


Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
try to install 1.5 version again.

Author

Commented:
actually some how some misunderstanding has been developed between vendor of app and us, the apps are compiled with 1.6 and we are installing 1.5 now coming back to 1.6 and after re installation still the java -version is showing the 1.5
Awarded 2011
Awarded 2011
Commented:
Why would you want to install 1.5 ? Wahtever was compiled with 1.6 should be running on 1.6. Whatever was compiled with 1.5 will also run on 1.6. Why not to run everything on 1.6 ?
Frank ContrepoisVP Technical Sales

Commented:
You or the dev team probably complie the files with java 1.6 as the target version.

Recompile with 1.5 it's generally simpler to do than to upgrade java to 1.6 on the server side

Author

Commented:
upgraded the version to 1.6 and compiled the problematic app with higher version.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial