Unable to compile java code.

Hi,

Whenever I try to compile java code I get the following error.

Compilation completed with 1 error and 0 warnings in 2 sec
java: Cannot find JDK '1.6' for module 'deleteme'


The SDK is set undet Project and also the Module. I really don't know what's going on since IDEA logs/errors aren't verbose enough.

Anyone had this issue before ?

Intellij IDEA Ultimate 12 on RHEL 6.2


Thanks.

0
2 comments
Avatar
Permanently deleted user

The error you show generally  indicates that the named SDK does not exist within the IntelliJ IDEA's configured SDK configurations. The name in quotes, '1.6' in this case, refers to the name of the SDK configuration, not necessarily the name of the JDK itself. So that value could just as easily be "My JDK For 1.6'. Go to File > Project Structure > Platform Settings > SDKs and make sure the a JDK with that name is defined.

0

If you are using Parallels or something similiar make sure youre Desktop isn't being shared. In that IntelliJ needs to keep the desktop isolated for some reason per user account. I had similiar issue but then once I unchecked "Desktop" the problem resolved.
Screen Shot 2013-01-11 at 11.51.56 PM.png

0

Please sign in to leave a comment.