Select Home Directory for JDK ??

I'm brand new to IntelliJIDEA, although I'm a Windows programmer from way back.

I'm trying to follow the instructions for "Configuring IntelliJ IDEA Plugin SDK" since that apparently needs to be done before I can get aproject started (WHythat's not done automatically during installation I don't know). But it pops up a dialog asking me to "Select Home Directory for JDK" and no matter what folder I select it tells me "The selected directory is not a valid home for JDK". It gives NO information as to what might actually be a vallid home for the JDK.

What directory do I need to specify?

- Roger Garrett

14 comments

IntelliJ IDEA Plugin SDK is required to develop plugins for IntelliJ IDEA. Are you sure that's what you are going to do?
If you are going to develop Java app you only need to configure Java SDK (JDK), but not IntelliJ IDEA Plugin SDK.
Well, in any case JDK stands for Java SDK or Java Software Developer Kit distributed by Oracle. IntelliJ IDEA doesn't know where it is installed on your computer, that's why it can't be configured automatically.

If you are brand new to IntelliJ IDEA look through 'Getting Started' and 'Basic Concepts' here and in embedded help (also available online).

0

Alexander,

Thank  you for the info on the SDK.

I've started by installing the JAVA SDK, as you suggested. I notice, however, that Oracle also offers their NetBeans IDE, which seems to do everything I need for developing JAVA programs.

So, why would I then need the JetBrains IntelliJ IDEA IDK? How is that different or superior to NetBeans?


- Roger Garrett

0

Yes, there are several free and open-source Java IDEs in the market, including IntelliJ IDEA Community Edition, NetBeans or Eclipse and also several paid ones including IntelliJ IDEA Ultimate Edition. If you are going to develop simple 'Hello world' Java apps you can take any and probably you won't notice significant difference between IDEs. When working professionally on large projects you want your tool to be the best possible and at this point you start to see difference in IDEs. I'm JetBrains employee, so you may guess which IDE I consider to be the best one. You don't have to believe me, just try yourself, ask colleagues or look for opinions of other developers in the internet.
If you are qurious about learning IntelliJ IDEA way of coding, take a look at the tutorials.

0

I installed Java jdk1.8.0_92 and IntelliJ IDEA Community Edition Version 2016.1.3 Build 145.1617.8 on my laptop running Windows 10. I followed every suggested steps, in the suggested order and changed accordingly my laptop's system variable settings. The following are my working system variables:
IDEA_JDK_64 = C:/Java/jdk1.8.0.92
JAVA_HOME = C:/Java/jdk1.8.0_92
JDK_HOME = C:/Java/jdk1.8.0_92/bin
Added c:/Java/jdk1.8.0_92 to beginning of system path
Added %JAVA_HOME%/bin to the end of system path
Added %JAVA_HOME%/lib

Some of the aforementioned settings are NOT listed or suggested under recommended IntelliJ IDEA settings, but I made them out of desperation, after trying so many different fixes found online. Nothing worked so far. From the beginning, when I launch IntelliJ IDEA, the Project SDK shows no path for my installed JDK, and when I try to manually set it to the folder where JDK lives it gives me the following error: "The selected directory is not a valid home for JDK"
When I try to manually change the Platform settings and Project settings to setup my installed JDK as the default SDK, I get the same error: "The selected directory is not a valid home for JDK".

Please help me, I don't know what else to do. 

1

Hi Luis,

your question is not related to the topic of this thread, so next time please start a new discussion instead of commenting the old one.

> I followed every suggested steps, in the suggested order and changed accordingly my laptop's system variable settings.

Where did you find these steps? You do not need to touch system variable settings at all to work with IntelliJ IDEA. You may safely revert all back. IntelliJ IDEA works out of the box.

> I try to manually set it to the folder where JDK lives it gives me the following error: "The selected directory is not a valid home for JDK"

Sorry for this answer, but all I can advise here is to make sure that selected directory is a valid JDK home.

Screenshots illustrating your problem and screenshots showing JDK structure (proving that this is a valid JDK) may help me to give you better answer.

Here's is a help page about creating the first Java app.

0

Hi Alexander,

Sorry if my question is not related to the topic of this thread. I took this one to post my question because it is by far the closest one to the issues I'm experiencing to setup my SDK path with IntelliJ IDEA.

Below are a couple of screenshots documenting my issue:



Thank you for your help.

Luis

0

Your JDK installation is definitely incorrect. For example it doesn't contain Java compiler (jdk1.8.0_92/bin/javac.exe). Where did you download it from? I've just downloaded JDK from Oracle site and its bin folder looks like this:

 

0

Hi Alexander:

I downloaded and installed JDK (as shown on my screenshot) from this URL
http://oracle.com/technetwork/java/javase/downloads/index.html

and this is what the Oracle link you sent me resolves to:

http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

I'm going to uninstall the JDK I got on my own and get it from the specific URL you sent me, then I'll let you know of my findings.

Thanks again.

Luis

 

0

Hi Alexander,

Sure enough! It seems that the jdk package I downloaded and installed was corrupted. I uninstalled it, wiped out all remaining files and folders, and started over from the Oracle site you advised me to get the JDK from earlier on this thread, and now everything works as it should...

Thanks a lot, have a great weekend!

Luis

0

Hello

I have the same problem Luis faced but I am unable to download the jdk package from the site you specified. I'm getting a page :

Could you please tell me what to do?

Thanks

Sreya

0

I've been having this issue for weeks and can't seem to pin point what is. Both IntelliJ and Android Studio will crash randomly and the crash report always says the same thing:

"....

System Integrity Protection: enabled

Crashed Thread: 12 Java: C2 CompilerThread0

Exception Type: EXC_BAD_ACCESS (SIGABRT)
Exception Codes: KERN_INVALID_ADDRESS at 0x00007dcc11f84ec0
Exception Note: EXC_CORPSE_NOTIFY

VM Regions Near 0x7dcc11f84ec0:
Stack 00007000126eb000-00007000127ea000 [ 1020K] rw-/rwx SM=COW thread 41
-->
MALLOC_TINY 00007fcc0dc00000-00007fcc0e000000 [ 4096K] rw-/rwx SM=PRV

Application Specific Information:
abort() called

System Integrity Protection: enabled

Crashed Thread: 12 Java: C2 CompilerThread0

Exception Type: EXC_BAD_ACCESS (SIGABRT)
Exception Codes: KERN_INVALID_ADDRESS at 0x00007dcc11f84ec0
Exception Note: EXC_CORPSE_NOTIFY

VM Regions Near 0x7dcc11f84ec0:
Stack 00007000126eb000-00007000127ea000 [ 1020K] rw-/rwx SM=COW thread 41
-->
MALLOC_TINY 00007fcc0dc00000-00007fcc0e000000 [ 4096K] rw-/rwx SM=PRV

Application Specific Information:
abort() called

...."

 

Please Help! 

0

What IDEA version do you use? Please try this suggestion: https://youtrack.jetbrains.com/issue/JRE-407#comment=27-2305435

Have you niticed any action that causes crash (may be indexing: https://youtrack.jetbrains.com/issue/IDEA-176887#comment=27-2661009) ?

0

I've tried that and made sure to set the SDK to java version 1.6.0_65 and it still does it. I can't really pin point any particular action that causes it because it happens at random, sometimes even during the initial start-up of the program. And it's not only for Intellij, it does the same thing for all the JetBrains IDEs, including android studio and they all have the same error on the crash log.

Crashed Thread:        14  Java: C2 CompilerThread0

 

Exception Type:        EXC_BAD_ACCESS (SIGABRT)

Exception Codes:       KERN_INVALID_ADDRESS at 0x00007dfacdcbb480

Exception Note:        EXC_CORPSE_NOTIFY

....

 

Of course the thread number and memory address varies but you get the idea. 

0

The last thing i tried was uninstalling and reinstalling Java and all the IDEs completely but that proved to be completely ineffective. 

0

Please sign in to leave a comment.