Tuesday, June 19, 2012

Antlr opened remote debugger instead of local debugger

When running the Debug for Antlr, you see this following output message in Debugger Tab/Output Message

I looked around and found this:
java.lang.UnsupportedClassVersionError: __Test__ : Unsupported major.minor version 51.0
               at java.lang.ClassLoader.defineClass1(Native Method)
               at java.lang.ClassLoader.defineClassCond(Unknown Source)
               at java.lang.ClassLoader.defineClass(Unknown Source)
               at java.security.SecureClassLoader.defineClass(Unknown Source)
               at java.net.URLClassLoader.defineClass(Unknown Source)
               at java.net.URLClassLoader.access$000(Unknown Source)
               at java.net.URLClassLoader$1.run(Unknown Source)
               at java.security.AccessController.doPrivileged(Native Method)
               at java.net.URLClassLoader.findClass(Unknown Source)
               at java.lang.ClassLoader.loadClass(Unknown Source)
               at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
               at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: __Test__.  Program will exit.
Exception in thread "main" 

And it opened Remote Debugger instead of using local Debugger

The problem that this occurred for me is due to several version of Java is installed in my machine.
e.g. java 1.6(x86) and java1.7(x64) i am using 64 bits machine.
I delete all the java version I have, and installed again java1.7, i works.

Originally in Help>About>Information tab, it shows java 1.6.
After unstalling and reinstall, it shows the correct version java 1.7.

No comments:

Post a Comment