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

No mentioning of required Java 11 in release notes #285

Closed
epkanol opened this issue Dec 13, 2019 · 16 comments
Closed

No mentioning of required Java 11 in release notes #285

epkanol opened this issue Dec 13, 2019 · 16 comments
Milestone

Comments

@epkanol
Copy link

epkanol commented Dec 13, 2019

Describe the bug
Running Idea with JDK 8 (or any JDK earlier than 11, ClassFileVersion 55.0) will render the SaveActions plugin unusable (disabled)

What triggered the plugin
Auto-updating to version 1.8.0+2019.3
No warning on incompatibilities, no apparent way to revert back to old plugin version (which worked awesome)

Versions
IntelliJ IDEA 2019.3 (Community Edition)
Build #IC-193.5233.102, built on November 28, 2019
Runtime version: 1.8.0_202-b32 amd64
VM: Java HotSpot(TM) 64-Bit Server VM by Oracle Corporation
Linux 4.15.0-72-generic
GC: ParNew, ConcurrentMarkSweep
Memory: 4029M
Cores: 8
Registry:
Non-Bundled Plugins: org.intellij.scala, com.jetbrains.edu, google-java-format, org.nik.presentation-assistant

@dubreuia
Copy link
Owner

Oh god, I didn't think people we're using JDK 8 for launching Intellij... I guess I'll have to revert.

@dubreuia
Copy link
Owner

dubreuia commented Dec 13, 2019

Thanks @epkanol for the issue

@epkanol
Copy link
Author

epkanol commented Dec 13, 2019

No worries, @dubreuia , it's an awesome plugin!
Saved my *** a bunch of times!

@dubreuia
Copy link
Owner

Hey @epkanol, doesn't JDK11 comes bundled with Intellij? How do you launch it?

@epkanol
Copy link
Author

epkanol commented Dec 13, 2019

/usr/lib64/jvm/8u202/bin/java -classpath /opt/idea-IC-191.6183.87/lib/bootstrap.jar....

Probably because
JAVA_HOME=/usr/lib64/jvm/8u202
And my java is set to java8-oracle
/usr/bin/java -> /etc/alternatives/java
/etc/alternatives/java -> /usr/lib/jvm/java-8-oracle/jre/bin/java

and so on...

Unsetting JAVA_HOME and restarting Idea via the shell script (and checking via /proc.../environ that JAVA_HOME is indeed unset) confirms that it will still use my installed Java 8 installation:
/usr/lib/jvm/java-8-oracle/bin/java -classpath /opt/idea-IC-191.6183.87/lib/bootstrap.jar:....

So I'd say that they'd use any Java 8 environ that they find on the host system (and, obviously, mine has a working JDK 8 in the default place), and use that.
There were some mentioning in the startup script about bundled JREs, but I did not check thoroughly. Could be that it's only used if no (or pre-JDK-8) JRE is found...

I'll consider upgrading to JDK 11, only trouble is the additional failure modes that would come due to different libraries (our app is still delivered on JDK 8). I know that JDK 11 can still compile JDK8-style, I'm more worried about libraries and exotic dependencies...
A more attractive short-term option for me would be to "revert the upgrade" of Save Actions (the old version worked perfectly well for my purporses). Is it even possible, if so, how?

@epkanol
Copy link
Author

epkanol commented Dec 13, 2019

Found answer myself :)
Downloaded 1.7.0 manually from https://plugins.jetbrains.com/plugin/7642-save-actions/versions
and installed it from disk.
After enabling and restarting, it works again, now I just have to remember not to update it :)
Thanks again for the awesome plugin!

@dubreuia
Copy link
Owner

dubreuia commented Dec 13, 2019

Yeah I was about to answer you for the rollback, that's the way to go. I'll rollback the changes over the weekend and notify you when 1.9.0 gets released so that you can upgrade.

YSK: Intellij comes bundled with the Jetbrain Runtime (JBR) which is a JDK11 (https://confluence.jetbrains.com/display/JBR/JetBrains+Runtime). But I guess you aren't needed to use it... Here's the bootstrap when downloading from the website, in my case the JDK that is used is in the "jbr" folder from the downloaded tar.

bin/idea.sh

# ---------------------------------------------------------------------
# Locate a JDK installation directory command -v will be used to run the IDE.
# Try (in order): IDEA_JDK, idea.jdk, ./jbr, ./jre64, JDK_HOME, JAVA_HOME, "java" in PATH.
# ---------------------------------------------------------------------

Unfortunately, I cannot compile to target 8 using 11 (https://stackoverflow.com/questions/55603018/how-to-compile-with-java-11-target-java-1-8-in-intellij)

@dubreuia
Copy link
Owner

End of life for Java 8:

January 2019 for Oracle (commercial)
December 2020 for Oracle (personal use)
At least September 2023 for AdoptOpenJDK

Oh god... 😥

@epkanol
Copy link
Author

epkanol commented Dec 13, 2019

I know :) I'll take this as (yet) another reason to upgrade. But it'll take some time...
Thanks for the fast feedback! I was about to point you to the SO link. Have no direct experience with Idea and how it relates to JDK 11/8 compatibility

@dubreuia
Copy link
Owner

Using the following gradle config I can build in JDK11 with target Java 8. But I lose new languages features. I'll stick to that for now.

sourceCompatibility = 1.8
targetCompatibility = 1.8

compileJava {
    options.compilerArgs = ['--release', '8']
}

@dubreuia
Copy link
Owner

Released in 1.9.0.

@dubreuia
Copy link
Owner

I will probably discontinue support for JDK8 soon, given that Intellij ships with its own JDK11. I fixed the issue for now.

@MartinX3
Copy link

MartinX3 commented Dec 14, 2019

I just use the JetBrains ToolBox to start IntelliJ and in my Project Settings I choose Java 8 compatibility.
And use just

sourceCompatibility = 1.8
targetCompatibility = 1.8

in my gradle config file.

Runs very well in Kubernetes with only Java 8 in our company.

I don't need complicated terminal line executions to start IntelliJ via its bootstrap.jar

@dubreuia
Copy link
Owner

Yeah, but I'd like to use Java 11 functionalities.

@MartinX3
Copy link

I mean I have the OpenJDK 11 installed on my development machine at the same time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants