My system JAVA_HOME and PATH are pointing to JDK 7, but I want to use JDK 8 in project opened in IntelliJ. I changes settings in Project Structure and it works great in IDE, but unfortunately Gradle build run from IDE still uses JDK 7. How can I specify Gradle JDK in IntelliJ 13.0?
Related
At project structure of Intellij, the JDK version is selected as 1.8
At Maven properties also, the JDK verison had been mention as 1.8
But still upon mvn --install somehow I get JDK verion as 11
Unable to understand the behaviour. And how do I make it as 1.8
Project screenshot
Try and change in Settings -> Build, Execution, Deployment -> Build Tools -> Maven -> Runner -> JRE to use JDK 8 or even better set the JAVA_HOME to the JDK 8
I've got two JDKs on my Mac, 1.8 and OpenJDK 11. I have this line in my .profile:
export JAVA_HOME=$(/usr/libexec/java_home -v 11)
In a terminal, java -version shows it's using 11, and echo $JAVA_HOME also points to 11.
I have set Preferences/Java/Installed JREs to 11. I have set the compliance level to 11 in the compiler config in my pom.
Eclipse, however, shows the "JRE System Library" in my project to be 1.8. When I execute a class in the project, it runs under 1.8.
What gives? Is there a secret setting on the Mac telling Eclipse to use 1.8? Or a secret setting in the Eclipse config?
(I'm using the latest version of Eclipse, 2018-09, fully up-to-date.)
Update: Per #vshcherbinin's comment, the Run Configuration/Java Application/JRE tab says "Project execution environment 'JavaSE-1.8' (Home)". I do not believe I have any project-specific settings. I deleted the .project, .classpath, and .settings in the project and re-imported the basic Maven project. Not sure how to make the project execution environment default to 11.
I was creating a new project in JetBrain IDE (IdeaIC-2016.1.2). While creating a new project SDk i choose the JDK option and when i want to select the path i was looking for JDK in Java folder but instead there were only JRE 1.8.0_31 and JRE 1.8.0_91 instead of JDK version? What could be the problem?
I have a Grails 2.3.7 project which should use Java 1.7.
I am using the Spring GGTS IDE as development tool and it is configured to use a Java 1.7 JDK.
I created the project in GGTS and changed the source and target level to 1.7.
Then I generate a maven pom file with the create-pom command.
So far so good. The project is linked to use a JRE System Library of version 1.7.
Then I change the project to be a Maven project in GGTS. What happens now is that in GGTS, the project changes the JRE System Library to become of version 1.6. I can manually switch it back to a java 1.7 library but every time I do a "Maven update project", the 1.6 library is back.
What am I doing wrong?
By removing the jre 1.6 as installed jre from GGTS, the project will use my jre 1.7. But in the list of linked dependencies it is still labeled JRE System Library [Java-SE 1.6] even though it points to my 1.7 instance. This solved my build-issues even though it still looks wrong.
Im trying to create a new grails project using the IDE GGTS (groovy and grails tool suite )
but it says that grails needs a JDK and JRE is not enough , I already installed JDK 1.7 and added the JAVA_HOME to the path
i also copied the grails folder and added a GRAILS_HOME to the path
in GGTS :
i tried In Window>Preferences>Java>Installed JREs to check JDK1.7.0_51
and
In Window>Preferences>Java>Installed JREs>Execution Environments I choosed JavaSE-1.7 and checked JDK1.7.0_51[perfect match]
the JDK installed is 64 bits and My PC is windows 8 64 bits
but the error persists
We have to make sure that the Java run time of our eclipse IDE points to a JDK instead of a JRE. Here are the steps:
Go to Window->Preferences
Edit Installed JRE if it is pointing to a JRE installation
Change it to the JDK installation directory. It is better if you also change the name