IntelliJ gives Fatal Error: Unable to find package java.lang in classpath or bootclasspath

Brig picture Brig · Jun 16, 2010 · Viewed 72.3k times · Source

When I try to make a simple module in IntelliJ it responds with:

Fatal Error: Unable to find package java.lang in classpath or bootclasspath

Answer

Brig picture Brig · Jun 16, 2010

Somehow the JDK language jars were removed from the classpath. All I had to do was reapply the JSDK home path.

Goto: File -> Project Structure -> Platform Settings -> SDKs Re-apply the JSDK home path.

Doing this added about 15 jars to the classpath. Apparently these are important for compiling.