zeromq/jzmq — Issue #80: Build fails with "class file has wrong version" error.
Author: hokage
Created: 2011-10-19 07:46:19+00:00
State: open

I am trying to do an rpmbuild on a Red Hat machine (2.6.18-238.el5) with Java version 1.7, but the build fails with the exception:

```
make[2]: Entering directory `/usr/src/redhat/BUILD/jzmq-2.1.0/src'
CLASSPATH=.:./.:$CLASSPATH javah -jni -classpath . org.zeromq.ZMQ
error: cannot access org.zeromq.ZMQ
bad class file: ./org/zeromq/ZMQ.class
class file has wrong version 51.0, should be 49.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
com.sun.tools.javac.util.Abort
at com.sun.tools.javac.comp.Check.completionError(Check.java:169)
at com.sun.tools.javadoc.DocEnv.loadClass(DocEnv.java:149)
at com.sun.tools.javadoc.RootDocImpl.(RootDocImpl.java:77)
at com.sun.tools.javadoc.JavadocTool.getRootDocImpl(JavadocTool.java:156)
at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:330)
at com.sun.tools.javadoc.Start.begin(Start.java:128)
at com.sun.tools.javadoc.Main.execute(Main.java:66)
at com.sun.tools.javah.Main.main(Main.java:147)
javadoc: error - fatal error
```

Is this a problem with the Java version? How should I proceed further?