简体   繁体   English

Ubuntu 18.04 / Netbeans 10.0致命错误:无法在类路径或引导类路径中找到包java.lang

[英]Ubuntu 18.04/Netbeans 10.0 Fatal Error: Unable to find package java.lang in classpath or bootclasspath

First, I work on Ubuntu 18.04 with netbeans 10.0 and open JDK 11. When I create a basic new project, alerts directly triggered. 首先,我在使用netbeans 10.0的Ubuntu 18.04上工作并打开JDK11。当我创建一个基本的新项目时,将直接触发警报。

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

I tried to uninstall/install netbeans and openJKD 11 but nothing work. 我试图卸载/安装netbeans和openJKD 11,但没有任何效果。

I looked on lots of forums discussions with this kind of problem but nothing work. 我在很多论坛上讨论了此类问题,但没有任何效果。 For information, 有关信息,

xxx:~$java -version

gives

openjdk version "11.0.3" 2019-04-16
OpenJDK Runtime Environment (build 11.0.3+7-Ubuntu-1ubuntu218.04.1)
OpenJDK 64-Bit Server VM (build 11.0.3+7-Ubuntu-1ubuntu218.04.1, mixed mode, sharing)

i don't know what i'm missing, if someone can help me... 我不知道我在想什么,如果有人可以帮助我...

You have NetBeans 10 version, but your JDK is version 11 . 您有NetBeans 10版本,但您的JDK是版本11 So try use NetBeans 11 version... or download/install JDK 10 (the same as NetBeans). 因此,请尝试使用NetBeans 11版本...或下载/安装JDK 10 (与NetBeans相同)。

Configure the platform, it seems that installers for Ubuntu 18.04 missed the path to Java platform JDK11. 配置平台后,似乎Ubuntu 18.04的安装程序错过了Java平台JDK11的路径。

Add a new definition pointing to the right folders. 添加指向正确文件夹的新定义。

Platform Name: JDK 11 Platform Folder: /usr/lib/jvm/default-java 平台名称:JDK 11平台文件夹:/ usr / lib / jvm / default-java

Then check the Sources/Source/Binary Format that must be configured to 11. 然后检查必须配置为11的“源/源/二进制格式”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM