i was getting the following from $JAVA_HOME/bin/java -jar
JAXB_RI_20050622.jar on my powerbook with both jdk 1.5:
Exception in thread "main" java.lang.UnsupportedClassVersionError:
com/sun/tools/xjc/installer/Main (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
the java in /usr/bin/ is in fact 1.4.2_05 (standard apple port of
hotspot), so this made sense. i confirmed the same on my linux machine
-- the installer seemed to invoke /usr/bin/java, which doesn't work.
not sure how the installer works, but if there's an exec of
"/usr/bin/java", or if it allows the shell to pick the "best" java from
the user's $PATH, i think that might be worth a look. maybe try to use
$JAVA_HOME/bin/java first, if that variable is set?
incidentally, i got the installer to run by creating a fake
/usr/bin/java that symlinked to my $JAVA_HOME/bin/java, and then fixing
the link after the installer ran. couldn't have done that if i didn't
have sudo though...
i tried a couple of queries on issue tracker, but everything came back
with no results (i'm still a bit bewildered by those types of query
forms:), so my apologies if this is a dup.
jon