mjson icon indicating copy to clipboard operation
mjson copied to clipboard

Support for Jdk 1.6

Open ayyagari opened this issue 8 years ago • 4 comments

v1.4.0 binary seems to be compiled with Java 7 (Unsupported major.minor version 51.0) Is there a binary version for Java 1.6?

Thanks!

ayyagari avatar Mar 20 '17 20:03 ayyagari

Hmm, I think that's mainly I don't even JDK 1.6 so I didn't bother compiling with it. Do you need the maven dependency to work? In that case I'd have to make a 1.4.2 that is binary compatible with 1.6. Otherwise, I suppose you can just clone and compile the project.

bolerio avatar Mar 20 '17 20:03 bolerio

I tried cloning and compiling. It didn't work as Json.java uses Objects class that is introduced only in Java 1.7.

ayyagari avatar Mar 21 '17 20:03 ayyagari

OK, I will take a look. It should be easy to backport. It was my intention to keep 1.6 compatibility....

bolerio avatar Mar 21 '17 21:03 bolerio

Hi @ayyagari ,

So I modified the maven compiler plugin configuration like this:

  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>2.0.2</version>
    <configuration>
      <source>1.6</source>
      <target>1.6</target>
    </configuration>
  </plugin>

and the produced jar file was tested and worked file with a java 6 compiler and runtime.

Let me know if that works for you and if you would like an official release 1.4.2 to maven central (it does take a bit of time to do, so I won't spend that time unless it's actually useful to somebody :)

bolerio avatar Apr 06 '17 19:04 bolerio