You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 11, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 11, 2026. It is now read-only.
I have application which is built with Java 1.5. Is there specific reason, why Java 7 is used... I have seen that JNA 4 is done with 1.7, is this the only reason? Would it be possible to create 1.5 binaries? I mean I can build them, question is what was reason to use J7?
The reason for Java 7 was that Java 6 (and earlier) has reached end of life and continued use should not be encouraged. I would urge you to upgrade your JVMs to 1.7 if possible.
Obviously, if that is not possible due to environment restrictions then the code is open source under MIT licence so you should be able to recompile it to a lower byte code level. I've not done this myself but I'd be interested in the outcome so I could add it to the support notes.
When making a library that others can use, it is good to go with oldest version you can (this would be probably 1.5 in your case since Generics are used), so that as many as possible can use it...
I tried using in on Java 5, but there were some issues:
there were some @OverRide tags, overriding methods which you are implementing from interface
JNA 4 Java version is higher than 1.5 (perhaps 1.6). I tried with last of 3.x versions (3.5.2) and it works.. Did you need any specific functionality from JNA 4, or did you just take the latest when project was started...
I accept your point about targeting as low a JVM as you can, but there comes a time when backwards compatibility becomes a burden to the main codebase.
I could remove the @OverRide annotations but it feels wrong to remove that safety net. It's good programming practice to allow the compiler to warn when code isn't actually overriding/implementing a method. This annotation is compatible with Java 6.
When selecting JNA I just went for the latest since it is most likely to have the least bugs and most mature code.
Overall, I could just about be convinced to lower the minimum JVM to 1.6 but I just can't condone 1.5 on the grounds that it's been EOL since October 2009.
Activity
gary-rowe commentedon Jan 13, 2015
The reason for Java 7 was that Java 6 (and earlier) has reached end of life and continued use should not be encouraged. I would urge you to upgrade your JVMs to 1.7 if possible.
Obviously, if that is not possible due to environment restrictions then the code is open source under MIT licence so you should be able to recompile it to a lower byte code level. I've not done this myself but I'd be interested in the outcome so I could add it to the support notes.
andyrozman commentedon Jan 14, 2015
When making a library that others can use, it is good to go with oldest version you can (this would be probably 1.5 in your case since Generics are used), so that as many as possible can use it...
I tried using in on Java 5, but there were some issues:
gary-rowe commentedon Jan 14, 2015
I accept your point about targeting as low a JVM as you can, but there comes a time when backwards compatibility becomes a burden to the main codebase.
I could remove the @OverRide annotations but it feels wrong to remove that safety net. It's good programming practice to allow the compiler to warn when code isn't actually overriding/implementing a method. This annotation is compatible with Java 6.
When selecting JNA I just went for the latest since it is most likely to have the least bugs and most mature code.
Overall, I could just about be convinced to lower the minimum JVM to 1.6 but I just can't condone 1.5 on the grounds that it's been EOL since October 2009.
andyrozman commentedon Jan 16, 2015
I agree with Java 5 here... If you implement some method (from Interface) you don't override it you implement it...
Even if you support just Java 6, you would need to go with latest JNA 3.x release.
I work for professional company and I know that one some projects we still use Java 5 (custom implementations).
gary-rowe commentedon Jan 16, 2015
OK, I'll look into aligning with Java 6 on my next refresh of the project.
[-]Java 1.5[/-][+]Support Java 1.6 (and below if possible)[/+]#11 Support Java 6
#11 Rewind JNA to 3.5.2 for Java 6 compatibility
#11 Adjust Travis to use OpenJDK6 during build
gary-rowe commentedon Jan 29, 2015
Made various adjustments to support Java6 and JNA 3.5.2.
Ready for review and close.
gary-rowe commentedon Jan 31, 2015
Code is now compiled under JDK1.6.