jiangzhendong / google-api-translate-java

Automatically exported from code.google.com/p/google-api-translate-java
0 stars 0 forks source link

Unsupported Class Verision Error #33

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Lead up:
1. Importing api into project in Eclipse
2. Calling Translate.translate() with appropriate methods:

japanese = Translate.translate(english, Language.ENGLISH,
                    Language.JAPANESE); 

The following error is generated:
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:675)
    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:316)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
    at Translator.getEngrish(Translator.java:29)
    at Translator.main(Translator.java:21)

Original issue reported on code.google.com by sadle...@gmail.com on 8 Nov 2008 at 6:13

GoogleCodeExporter commented 8 years ago
i had the same problem on jdk 1.5.0_16 
recompiled from src and the problem went away

Original comment by son.c...@gmail.com on 10 Nov 2008 at 2:35

GoogleCodeExporter commented 8 years ago
Thanks. Any chance this is dependent on any modules outside the jdk?

Original comment by sadle...@gmail.com on 10 Nov 2008 at 3:17

GoogleCodeExporter commented 8 years ago
It looks like at some point the OpenJDK slipped into my build environment - I'm 
about
to put up version 0.51 compiled against a Sun JDK 1.5 which should fix this. 
Apologies.

Original comment by rich.mid...@gmail.com on 9 Dec 2008 at 6:45