-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minimum Java Version #73
Comments
You're probably right. If it is imperative that you work with JDK 6, I know I used JJWT with Java 6 late last Spring. So an older version of JJWT might work for you. |
@strokine I haven't looked at the GZIPOutputStream API in a little while, but I'm assuming it is backwards compatible such that we can just use it in a way that is compliant with JDK 6. Has anyone checked yet? If so, we can keep JDK 6 compatibility. That said, it is a bit odd today that JDK 6 be supported by (m)any current open source projects. @pglezen do you see a strong reason to continue to support 6? |
The shop in which I worked that was using JDK 6 last Spring has since upgraded to JDK 7. IMHO, you have to weigh the burden of maintaining JDK 6 support with the following factors:
So if some shop is adamant about JDK 6 support, they can simply download an earlier build of JJWT. It may not have all the bells, whistles, and security patches of the latest JJWT. But I feel it is fair to shift that burden to the JDK 6 shops and free JJWT developers (like you) from JDK 6 constraints. Disclaimer: My biased perspective is largely driven by my role supporting IBM WebSphere Application Server customers. Such customers have a painless route to migrate from JDK 6 to JDK 7 using the |
I use Java 8, but I've submitted the issue, just because, I've checked out the project and mvn install gives a compilation error, because it uses java version set by jdk.version property. Once, I've flipped the version to 7, everything worked fine. |
Does anybody know what the latest version that ran on Java 6 was? |
The latest 0.7 should work on JDK6 if you compile it yourself with JDK6. Just don't use the GZipOutputStream ( |
It's the jackson library that is ruining the fun (they started to go Java 7 with 2.7+) |
You don't need to do that I don't think - you can add an |
Thanks for the quick feedback. Compiling 0.6 or 0.5.1 on a Mac with the latest Java 6 just proclaims: |
Ah, yeah, I guess I couldn't remember any language discrepancies. I didn't think there were any, but this shows otherwise! |
Closing since JDK 7 is used currently. JDK8 as a minimum will be resolved via #308 |
It looks like the minimum JDK version is 1.6
But GzipCompressionCodec instantiates GZIPOutputStream with signature which is available only in Java 7:
https://github.com/jwtk/jjwt/blob/master/src/main/java/io/jsonwebtoken/impl/compression/GzipCompressionCodec.java#L65
new GZIPOutputStream(outputStream, true):
Java 6:
https://docs.oracle.com/javase/6/docs/api/java/util/zip/GZIPOutputStream.html
Java 7:
https://docs.oracle.com/javase/7/docs/api/java/util/zip/GZIPOutputStream.html
I think we should upgrade the minimum JDK version to 7
The text was updated successfully, but these errors were encountered: