Set compile target to Java 1.6. #82

Closed
r0man opened this Issue May 21, 2012 · 2 comments

Projects

None yet

3 participants

@r0man

I'm running Java 7 on my development machine, but our Hadoop
Cluster is still on Java 6. When using the 1.8.8-SNAPSHOT release
of Cascalog with such a setup I get the following error on the
cluster:

java.lang.UnsupportedClassVersionError: cascalog/hadoop/ClojureKryoSerialization : Unsupported major.minor version 51.0

Adding :javac-options {:target "1.6"} to cascalog's project.clj
file solves this. Would it be possible to put this into the next
release of Cascalog?

Roman.

@BertrandDechoux

I can't answer your question. But if you do a pull request, then your patch might be integrated quicker.

@r0man

Hi Nathan,

sorry, false alarm. I run Java 7 on my development machine and
had a version of cascalog in my local Maven repository that I
compiled myself. Looks like this one was somehow compiled against
Java 7:

javap -verbose /tmp/cascalog/KryoService.class | head

public class cascalog.KryoService
  SourceFile: "KryoService.java"
  minor version: 0
  major version: 51
  flags: ACC_PUBLIC, ACC_SUPER

I cleaned up my Maven repo and fetched the cascalog jar again
from Clojars. This one is indeed compiled against Java 6:

javap -verbose /tmp/cascalog-clojars/KryoService.class | head

public class cascalog.KryoService
  SourceFile: "KryoService.java"
  minor version: 0
  major version: 50
  flags: ACC_PUBLIC, ACC_SUPER

I think this only happens if you compile cascalog yourself with
Java 7. Maybe still a good idea to force compilation against 1.6?

Roman.

@Quantisan Quantisan closed this Mar 14, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment