fmgasparino / google-gin

Automatically exported from code.google.com/p/google-gin
Apache License 2.0
0 stars 0 forks source link

java.lang.UnsupportedClassVersionError: Bad version number in .class file #47

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. download&build gin.jar with gwt1.6.4
2. add the lib gin.jar to the eclipse-build-path
2. adding the <inherits name="com.google.gwt.inject.Inject"/>

What is the expected output? What do you see instead?
Should deploy&run without errors, but gives a [ERROR] Line 20: Unexpected 
exception while 
processing element 'inherits'
java.lang.UnsupportedClassVersionError: Bad version number in .class file

What version of the product are you using? On what operating system?
gwt1.6.4 with the eclipse-plugin on a Mac with several jdks - default is 
1.6.0_13

Is gin supposed to work with gwt1.6.4? Are there any special recommendations on 
building gin 
(eg. a jdk1.5 needed??) I haven't yet used any of the gin-classes, just trying 
to inherit the 
module.

Original issue reported on code.google.com by vierunds...@googlemail.com on 23 Jun 2009 at 8:52

GoogleCodeExporter commented 9 years ago
Essentially, my guess is you're running code on a Java 5 platform which was 
built on
Java 6. It's quite possibly your own code - usually it says in the error what 
class
it's having problems with.

My guess is there is a mismatch between where your classes are being built and 
what's
running the server. If you're on Eclipse 3.4, it will use Java 6 (if you 
configure
that to be the default with the Java Preferences app). However, the command 
line will
default to using Java 5, even if you change the Java Preferences. So, it's 
possible
that your IDE is building in Java 6 and the command line in Java 5.

Note that you can't run the 'Hosted Mode' debugger in Java 6. There are some fun
workarounds to get that going too...

Original comment by Bitmei...@gmail.com on 25 Jun 2009 at 4:00

GoogleCodeExporter commented 9 years ago
I think the problem is as described in the previous comment: Make sure that all 
your
code is compiled against the same Java version! I'll close this issue, feel 
free to
ping me if you think that it is a Gin problem.

Original comment by aragos on 2 Jul 2009 at 4:10