Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how can i set the jdk in intellij 9 on mac

Tags:

I have a project on intellij and now i wanna run it on intellinj 9 on mac. when i run the project i get the error -> "the JDK is not specifiedfor module "XXXXX" specify the JDK in Configuration project". when i go there in the dependencie for module SDk there is No Project JDk. and when i click on new it is just JSDK, Intellij idea plugin SDK,Flex SDK,AIR SDK, Flexmojos SDk and Mobile SDK

What can I do?

like image 946
Ali_IT Avatar asked Jun 07 '10 22:06

Ali_IT


People also ask

How do I change the JDK in IntelliJ?

In the Project Structure dialog Ctrl+Alt+Shift+S , select SDKs. Select the necessary JDK version if you have several JDKs configured, and open the Documentation Path tab on the right.


2 Answers

Refer to the documentation. You need to add new JSDK with the following path:

/System/Library/Frameworks/JavaVM.Framework/Versions/CurrentJDK/Home 
like image 97
CrazyCoder Avatar answered Nov 07 '22 23:11

CrazyCoder


Agreed. Going one step further, I would recommend setting up the different sdk's explicitly for Java 5, 6, etc.

On OS 10.6, use:

/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home 
like image 24
Ed J Avatar answered Nov 08 '22 00:11

Ed J