1

Whenever I try to compile/run a java code I get the following.

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

The SDK path is set and selected in "Project SDK" I'm using IDEA 12 on RHEL 6.2

Thanks.

user1757189
  • 65
  • 1
  • 5
  • Make sure to [use Oracle JDK](http://stackoverflow.com/a/8384111/104891), try to add a new JSDK configuration in IDEA and check that all modules/project has this new JDK selected, then rebuild the project. If you still have a problem, share a sample project illustrating this problem. – CrazyCoder Jan 24 '13 at 10:33

1 Answers1

0

Ensure that your dependencies include Java 1.6 in that specific module.

IntelliJ 11, showing module page with dependencies tab open.

Here, my module SDK is Java 1.7, but it's the same idea - if Java 1.6 doesn't appear or isn't available, either use the project SDK or find it on your box using the "New" dialog.

Makoto
  • 104,088
  • 27
  • 192
  • 230
  • 1
    I do have the Java 1.6 SDK set for the Module just like in your screenshot. Still have the same problem. – user1757189 Jan 04 '13 at 19:26
  • 1
    I have the same issue. I'm using Windows 8 64bit and have 1.7 JDK (64bit) installed. I've tried switching between 32bit JDK's and still nothing changes. – Scott Jan 11 '13 at 12:26