wiztools/rest-client

minimum Java requirement?

Closed this issue ยท 11 comments

restclient-ui-fat-3.7.0.jar seems to require something newer than Java 8. Is this intentional? If so it seems a little aggressive. Personally I'm waiting for Java 11 since it will be an LTS and not have an annoyingly short time til end-of-life like 9 and 10. Running restclient-ui-fat-3.7.0.jar from Java 8 results in

Exception in thread "main" java.lang.UnsupportedClassVersionError: org/wiztools/restclient/ui/Main has been compiled by a more recent version of the Java Runtime (class file version 54.0), this version of the Java Runtime only recognizes class file versions up to 52.0

Unfortunate decision by Oracle.

From my maintenance ease point of view, I did want RESTClient source code and build scripts to be updated and compatible with the newer versions of Java. That was the rationale behind the move.

For my own work, I use JEnv to switch between JVMs in my laptop.

I'm not sure I understand. Unless you are using something that actually requires the latest JVM runtime support (which is seems unlikely) all you need to do is compile with the right options and your Java 10 will produce bytecode that is compatible with Java 8 or Java 7 or whatever you chose as a minimum.

I also meet the above issue. Java 8 is a LTS version one and now it could be the most popular one in Java world. I think we should support it :)

Ok. Let me check what I need to do to make this Java 8 compatible.

Very new version of OpenJDK 8 is not happy with these builds. I even tried the one from July 2018.

$ java -version
openjdk version "1.8.0_192"
OpenJDK Runtime Environment (build 1.8.0_192-b26)
OpenJDK 64-Bit Server VM (build 25.192-b26, mixed mode)

Error:

$ java -jar restclient-ui-fat-3.6.2.jar 
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/wiztools/restclient/ui/Main has been compiled by a more recent version of the Java Runtime (class file version 54.0), this version of the Java Runtime only recognizes class file versions up to 52.0
[. . .]

Ok, the community wins. I'll work on this with priority.

I've few dependent projects that also I migrated to Java 9/10, which I need to make Java 8 compatible before proceeding.

I've modified the code and dependencies to support Java 8. A build of this version is available here:

Can the audience test the builds and let me know if it works as expected? Especially in Mac I want help knowing if the .dmg version works with both Java 8 (with no Java 10 installed in parallel) and Java 10.

Once this sanity confirmation is given by the community, I'll publish the release.

The jar works for me with Java 1.8.0_191 on Linux.
Thanks!

It works with Java 1.8.0_181 on Linux.
Special thanks !

Thanks @ericjs and @toantk238 ! Released 3.7.1 with support for Java 8.

A belated Thanks!