Specifying JDK IDEA64.exe Uses

I start IDEA via Idea64.exe.  Judging from the Help | About screen, it's using JDK 1.8.0-ea.

I have downloaded JDK 1.8.0-ea to evaluate it, but just unzipped the JDK and didn't install the Java 8 JRE.  However, a search of my Windows registry revealed something (IDEA?)  installed a 1.8.0-ea JDK, with a registry entry keyed to  "HKEY_USERS\...\Software\ej-technologies\exe4j\jvms\c:/program  files/java/jdk1.8.0/jre/bin/java.exe"

I'm not 100% sure why IDEA64.exe is using / picking up JDK 1.8.0-ea, but I suspect that is the culprit.

My JAVA_HOME points to a JDK 1.7 installation. I then have JDK_HOME and JDK_64_HOME pointing to the JAVA_HOME env var.

So my question is this: How do I get IDEA64 v12.1 (IU-129.17) to not use JDK 1.8.0-ea and use a different JDK?

I'd prefer it use the one I reference in JAVA_HOME / JDK_HOME / JDK_64_HOME.

Also, to confirm, does the Help | About screen show the JDK that IDEA is currently using, or the JDK version is can use /  shipped with?

Thanks.

--
jack

11 comments

Hello,

'About' dialog shows 'java.version' system property's value there, so, it must be information about jre used to run the ide process.

What IJ version do you use?

Denis

0

Denis,

Thanks for your answer.

I went into the Windows Control Panel | Programs and Features. Sure enough, JDK 8 was listed there so that's probably what caused IDEA to pick it up.

I uninstalled JDK 1.8.0-ea and now IDEA is reporting it's using JDK 1.7.0_17.  So far, so good.

I'd like to continue evaluating JDK 1.8.0 and would like to install the latest update (jdk-8-ea-bin-b80-windows-x64-07_mar_2013).  However, I don't want IDEA64.exe using JDK 1.8.0. I want IDEA to use the stable JDK 1.7.0-17 version.

So my original question remains: How can I specify the JDK IDEA64.exe is using?  I'm hoping there's a command line arg, or environment varable, or something I can set to control this.

(If there's not a way, I'd like to recommend one be devised.  Something as simple as a command line argument like -jdkVar=JDK_64_HOME would suffice.  Then I could specify which JVM I'd like to be using in the env variable.)

Thanks again.

--
jack

0

What IJ version do you use? Native windows launcher was changed recently, there is a possible case that a bug was introduced there.

Denis

0

Denis,

>> What IJ version do you use? Native windows launcher was changed  recently, there is a possible case that a bug was introduced there.

I'm running IDEA 12 Ultimate v12.1 (Leda, IU-129.17)

I believe I've been seeing JDK 1.8.0-ea getting picked up for several v12 EAP versions.  I thought maybe IDEA installed with 1.8.0-ea, but only learned today it was picking it up from my environment - despite my having set JAVA_HOME, JDK_HOME, and JDK_64_HOME to point to JDK 1.7.

Thanks for your help on this.

--
jack

0

IntelliJ IDEA does not bundle any 64-bit JDK. If the IDEA_JDK_64 environment variable is defined, it uses the JDK to which it points; otherwise, it uses the JDK specified by the JAVA_HOME environment variable.

0

Dmitry,

you wrote:

IntelliJ IDEA does not bundle any 64-bit JDK. If the IDEA_JDK_64 environment variable is defined, it uses the JDK to which it points; otherwise, it uses the JDK specified by the JAVA_HOME environment variable.


I can say, with some certainty, that this is not the behavior I'm seeing in 12.1 (IU-129.17) as the following screenshots show.

First, I set the IDEA_JDK_64 environment variable to point to JDK 1.6.0_39 and verified that it is a valid JDK location:

IDEA_JDK_64_Screenshot.png


Then, I started IDEA64.exe v12.1 (IU-129.17) and opened Help | About:

IDEA_12.1_Help_About.png

This shows IDEA is using JDK 1.7.0_17.  That happens to be what JAVA_HOME and IDEA_JDK are set to, but I don't think that's why IDEA64.exe is picking up that JDK version.  Before, I had downloaded JDK 1.8.0-ea for evaluation and IDEA64.exe was using it ... even though no environment variable was set to point to it; i.e. not JAVA_JOME, IDEA_JDK, or IDEA_JDK_64.  So it appears the Idea64.exe is picking up the JDK version from somewhere else, perhaps the Windows registry.

My real goal here is to be able to download the JDK 1.8.0-ea, but have the IDEA64.exe IDE not use it and use one of the stable JDK versions instead.

--
jack

0

I had the same issue prior to setting the "IDEA_JDK_64" variable. Without it being set, IDEA was launching under Java 8 (even thought I had JAVA_HOME set to my 1.7 x64 install). As soon as I set IDEA_JDK_64 the issue went away. So it does seem the load order is

  1. IDEA_JDK_64 env var
  2. latest version as found somewhere, registry likely.

My real goal here is to be able to download the JDK 1.8.0-ea, but have the IDEA64.exe IDE not use it and use one of the stable JDK versions instead.

--
jack

That was my goal as well. With the IDEA_JDK_64 set, I have that behavior.

0

Mark,

Please take a close look at the command prompt screenshot. You will see that IDEA_JDK_64 is set to a JDK 1.6 path, but the Idea64.exe Help | About screenshot shows it is using a JDK 1.7 version.

It looks to me like the IDEA_JDK_64 environment variable is not being referenced at all.

Thanks for the post.

--
jack

0

Hello Jack,

The setting of an environment variable within a command shell is valid only for that shell. It is not valid outside that shell. (If you open a second command window and execute the java version command, you will see it is not the value you set in the first command window.) So after setting that, if you went to Windows Explorer or the Start menu and launched IDEA, it would not use the value set in the command window. You'll need to set IDEA_JDK_64 via the control panel applet.

-Mark
0

Mark,

If you look closely at the command prompt screenshot, you'll notice I am NOT setting the value of the IDEA_JDK_64 environment variable; I'm merely outputting it. Executing set IDEA_JDK without the equals sign following it merely shows the values of all environment variable values whose names start with IDEA_JDK. (For more help with the set command, enter set /? at the command prompt.)

The IDEA_JDK_64 environment variable is specified via My Computer | Properties | Advanced system setting | Environment Variables as shown in the following screenshot:

EnvVars.png

So in fact, if Idea64.exe was reading IDEA_JDK_64, it should be using the 1.6, not 1.7, version of the JDK.

--
jack

0

Sorry, I looked at the screenshot too quickly.

0

Please sign in to leave a comment.