Skip to content
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

Compile code with Java 6 compatibility #13

Open
AdrianBuza opened this issue Jan 14, 2015 · 3 comments
Open

Compile code with Java 6 compatibility #13

AdrianBuza opened this issue Jan 14, 2015 · 3 comments

Comments

@AdrianBuza
Copy link

Oxygen still supports Java 6, especially on OS X. The extension should be compiled with Java 6 compatibility flags.
javac -source 1.6 -target 1.6

Otherwise you'll get:
java.lang.UnsupportedClassVersionError: info/histei/HTExtensionsBundle : Unsupported major.minor version 51.0

Regards,
Adrian

@odaata
Copy link
Owner

odaata commented Jan 15, 2015

Although Oxygen still supports Java 6, I decided to use Java 7 for the HisTEI framework and only support that version or higher. I did this for multiple reasons: Java 6 is not receiving security updates/patches anymore, version 7 has some nice new language features and I was interested in using NIO to track files (though in the end I didn't actually use it). Can you upgrade your Java to version 7? Also, if you're on a Mac, do note that you need to download the Oxygen package that includes the latest version of Java (down on the right-hand side of the screen). This is also explained on the Installation page of the Wiki.

@odaata odaata closed this as completed Jan 15, 2015
@AdrianBuza
Copy link
Author

I'm part of the Oxygen support team (I should have mentioned this before) and we sometimes receive problem reports from Oxygen users with UnsupportedClassVersionError for your addon. These are users running Oxygen on OS X where we still recommend using Java 6. It's true that there's also a distribution of Oxygen with Java 8 (we've upgraded it), but right now we only recommend it in special cases.

Anyway, what I was proposing was to configure the Java compiler (javac) compatibility flags to keep the generated Java bytecode of the compiler compatible with Java 6.
So, you can still use the Java 7 or 8 JDK for compiling, but with the Java 6 flags (-source 1.6 -target 1.6).

@odaata
Copy link
Owner

odaata commented Jan 16, 2015

Yes, I could do that, the only problem is that I've been using new language features available in Java 7, so my source is really 1.7 and the compiler won't compile it down to 1.6. I'll re-open this issue as something to work on though. In the meantime, I've been telling Mac users to download the Oxygen version with the latest SDK.

@odaata odaata reopened this Jan 16, 2015
@ilesoviy
Copy link

ilesoviy commented Feb 20, 2024 via email

Repository owner deleted a comment from sherlok235 Feb 23, 2024
Repository owner deleted a comment from sherlok235 Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants