Skip to content
This repository was archived by the owner on Nov 11, 2026. It is now read-only.
This repository was archived by the owner on Nov 11, 2026. It is now read-only.

Support Java 1.6 (and below if possible) #11

Closed

Description

@andyrozman

Hi !

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?

Take care,
Andy

Activity

  1. gary-rowe commented on Jan 13, 2015

    @gary-rowe
    Owner

    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.

  2. andyrozman commented on Jan 14, 2015

    @andyrozman
    Author

    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...
  3. gary-rowe commented on Jan 14, 2015

    @gary-rowe
    Owner

    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.

  4. andyrozman commented on Jan 16, 2015

    @andyrozman
    Author

    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).

  5. gary-rowe commented on Jan 16, 2015

    @gary-rowe
    Owner

    OK, I'll look into aligning with Java 6 on my next refresh of the project.

  6. changed the title [-]Java 1.5[/-] [+]Support Java 1.6 (and below if possible)[/+] on Jan 16, 2015
  7. modified the milestone: Release 0.3.0 on Jan 16, 2015
  8. added 3 commits that reference this issue on Jan 29, 2015
  9. added
    awaiting reviewThis code is awaiting the original creator of the issue to review the solution and provide feedback
    on Jan 29, 2015
  10. gary-rowe commented on Jan 29, 2015

    @gary-rowe
    Owner

    Made various adjustments to support Java6 and JNA 3.5.2.

    Ready for review and close.

  11. gary-rowe commented on Jan 31, 2015

    @gary-rowe
    Owner

    Code is now compiled under JDK1.6.

  12. removed
    awaiting reviewThis code is awaiting the original creator of the issue to review the solution and provide feedback
    on Jan 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions