本文介绍了IntelliJ给出了致命错误:无法在classpath或bootclasspath中找到包java.lang的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在IntelliJ中创建一个简单模块时,它响应:

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


推荐答案

不知何故,JDK语言罐子是从类路径中删除。我所要做的就是重新应用JSDK主路径。

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

转到:
文件 - >项目结构 - >平台设置 - > SDKs
Re - 应用JSDK主路径。

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

这样做会在类路径中添加大约15个罐子。显然这些对于编译很重要。

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

这篇关于IntelliJ给出了致命错误:无法在classpath或bootclasspath中找到包java.lang的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-12 07:12