我无法在 Ubuntu 18.04 上的 NetBeans 8.2 上创建新项目,因为它有 Java 8 而不是 9。
Log Session: Friday, February 15, 2019 at 10:24:48 PM Eastern European Standard Time
System Info:
Product Version = NetBeans IDE 8.2 (Build 201609300101) (#5fd841261bf9)
Operating System = Linux version 4.15.0-45-generic running on amd64
Java; VM; Vendor = 10.0.2; OpenJDK 64-Bit Server VM 10.0.2+13-Ubuntu-1ubuntu0.18.04.4; Oracle Corporation
Runtime = OpenJDK Runtime Environment 10.0.2+13-Ubuntu-1ubuntu0.18.04.4
Java Home = /usr/lib/jvm/java-11-openjdk-amd64
System Locale; Encoding = en_US (nb); UTF-8
Home Directory = /home/abdelrahman
Current Directory = /home/abdelrahman
User Directory = /home/abdelrahman/.netbeans/8.2
Cache Directory = /home/abdelrahman/.cache/netbeans/8.2
Installation = /home/abdelrahman/netbeans-8.2/nb
/home/abdelrahman/netbeans-8.2/ergonomics
/home/abdelrahman/netbeans-8.2/ide
/home/abdelrahman/netbeans-8.2/extide
/home/abdelrahman/netbeans-8.2/java
/home/abdelrahman/netbeans-8.2/apisupport
/home/abdelrahman/netbeans-8.2/webcommon
/home/abdelrahman/netbeans-8.2/websvccommon
/home/abdelrahman/netbeans-8.2/enterprise
/home/abdelrahman/netbeans-8.2/mobility
/home/abdelrahman/netbeans-8.2/profiler
/home/abdelrahman/netbeans-8.2/php
/home/abdelrahman/netbeans-8.2/harness
/home/abdelrahman/netbeans-8.2/cnd
/home/abdelrahman/netbeans-8.2/cndext
/home/abdelrahman/netbeans-8.2/dlight
/home/abdelrahman/netbeans-8.2/groovy
/home/abdelrahman/netbeans-8.2/javafx
/home/abdelrahman/netbeans-8.2/platform
Boot & Ext. Classpath =
Application Classpath = /home/abdelrahman/netbeans-8.2/platform/lib/boot.jar:/home/abdelrahman/netbeans-8.2/platform/lib/org-openide-modules.jar:/home/abdelrahman/netbeans-8.2/platform/lib/org-openide-util.jar:/home/abdelrahman/netbeans-8.2/platform/lib/org-openide-util-lookup.jar:/home/abdelrahman/netbeans-8.2/platform/lib/org-openide-util-ui.jar:/home/abdelrahman/netbeans-8.2/platform/lib/locale/boot_ja.jar:/home/abdelrahman/netbeans-8.2/platform/lib/locale/boot_pt_BR.jar:/home/abdelrahman/netbeans-8.2/platform/lib/locale/boot_ru.jar:/home/abdelrahman/netbeans-8.2/platform/lib/locale/boot_zh_CN.jar:/home/abdelrahman/netbeans-8.2/platform/lib/locale/org-openide-modules_ja.jar:/home/abdelrahman/netbeans-8.2/platform/lib/locale/org-openide-modules_pt_BR.jar:/home/abdelrahman/netbeans-8.2/platform/lib/locale/org-openide-modules_ru.jar:/home/abdelrahman/netbeans-8.2/platform/lib/locale/org-openide-modules_zh_CN.jar:/home/abdelrahman/netbeans-8.2/platform/lib/locale/org-openide-util_ja.jar:/home/abdelrahman/netbeans-8.2/platform/lib/locale/org-openide-util-lookup_ja.jar:/home/abdelrahman/netbeans-8.2/platform/lib/locale/org-openide-util-lookup_pt_BR.jar:/home/abdelrahman/netbeans-8.2/platform/lib/locale/org-openide-util-lookup_ru.jar:/home/abdelrahman/netbeans-8.2/platform/lib/locale/org-openide-util-lookup_zh_CN.jar:/home/abdelrahman/netbeans-8.2/platform/lib/locale/org-openide-util_pt_BR.jar:/home/abdelrahman/netbeans-8.2/platform/lib/locale/org-openide-util_ru.jar:/home/abdelrahman/netbeans-8.2/platform/lib/locale/org-openide-util-ui_ja.jar:/home/abdelrahman/netbeans-8.2/platform/lib/locale/org-openide-util-ui_pt_BR.jar:/home/abdelrahman/netbeans-8.2/platform/lib/locale/org-openide-util-ui_ru.jar:/home/abdelrahman/netbeans-8.2/platform/lib/locale/org-openide-util-ui_zh_CN.jar:/home/abdelrahman/netbeans-8.2/platform/lib/locale/org-openide-util_zh_CN.jar
Startup Classpath = /home/abdelrahman/netbeans-8.2/platform/core/core.jar:/home/abdelrahman/netbeans-8.2/platform/core/asm-all-5.0.1.jar:/home/abdelrahman/netbeans-8.2/platform/core/org-netbeans-libs-asm.jar:/home/abdelrahman/netbeans-8.2/platform/core/org-openide-filesystems-compat8.jar:/home/abdelrahman/netbeans-8.2/platform/core/core-base.jar:/home/abdelrahman/netbeans-8.2/platform/core/org-openide-filesystems.jar:/home/abdelrahman/netbeans-8.2/platform/core/locale/org-netbeans-libs-asm_ja.jar:/home/abdelrahman/netbeans-8.2/platform/core/locale/org-openide-filesystems-compat8_pt_BR.jar:/home/abdelrahman/netbeans-8.2/platform/core/locale/core-base_ru.jar:/home/abdelrahman/netbeans-8.2/platform/core/locale/core_ru.jar:/home/abdelrahman/netbeans-8.2/platform/core/locale/org-openide-filesystems_pt_BR.jar:/home/abdelrahman/netbeans-8.2/platform/core/locale/core-base_ja.jar:/home/abdelrahman/netbeans-8.2/platform/core/locale/org-netbeans-libs-asm_zh_CN.jar:/home/abdelrahman/netbeans-8.2/platform/core/locale/org-netbeans-libs-asm_pt_BR.jar:/home/abdelrahman/netbeans-8.2/platform/core/locale/org-openide-filesystems_ja.jar:/home/abdelrahman/netbeans-8.2/platform/core/locale/org-openide-filesystems-compat8_ja.jar:/home/abdelrahman/netbeans-8.2/platform/core/locale/org-openide-filesystems_zh_CN.jar:/home/abdelrahman/netbeans-8.2/platform/core/locale/core_pt_BR.jar:/home/abdelrahman/netbeans-8.2/platform/core/locale/org-openide-filesystems-compat8_zh_CN.jar:/home/abdelrahman/netbeans-8.2/platform/core/locale/core-base_zh_CN.jar:/home/abdelrahman/netbeans-8.2/platform/core/locale/org-netbeans-libs-asm_ru.jar:/home/abdelrahman/netbeans-8.2/platform/core/locale/core-base_pt_BR.jar:/home/abdelrahman/netbeans-8.2/platform/core/locale/org-openide-filesystems-compat8_ru.jar:/home/abdelrahman/netbeans-8.2/platform/core/locale/core_zh_CN.jar:/home/abdelrahman/netbeans-8.2/platform/core/locale/org-openide-filesystems_ru.jar:/home/abdelrahman/netbeans-8.2/platform/core/locale/core_ja.jar:/home/abdelrahman/netbeans-8.2/nb/core/org-netbeans-upgrader.jar:/home/abdelrahman/netbeans-8.2/nb/core/locale/org-netbeans-upgrader_ja.jar:/home/abdelrahman/netbeans-8.2/nb/core/locale/org-netbeans-upgrader_pt_BR.jar:/home/abdelrahman/netbeans-8.2/nb/core/locale/core_nb_ru.jar:/home/abdelrahman/netbeans-8.2/nb/core/locale/core_nb.jar:/home/abdelrahman/netbeans-8.2/nb/core/locale/core_nb_ja.jar:/home/abdelrahman/netbeans-8.2/nb/core/locale/org-netbeans-upgrader_zh_CN.jar:/home/abdelrahman/netbeans-8.2/nb/core/locale/core_nb_pt_BR.jar:/home/abdelrahman/netbeans-8.2/nb/core/locale/core_nb_zh_CN.jar:/home/abdelrahman/netbeans-8.2/nb/core/locale/org-netbeans-upgrader_ru.jar
-------------------------------------------------------------------------------
INFO [org.netbeans.modules.netbinox]: Install area set to file:/home/abdelrahman/netbeans-8.2/
WARNING [org.netbeans.core.modules]: the modules [org.netbeans.modules.xml.text] use org.netbeans.modules.editor.deprecated.pre65formatting which is deprecated.
WARNING [org.netbeans.core.modules]: the modules [org.netbeans.modules.ide.kit, org.netbeans.modules.xml.text] use org.netbeans.modules.editor.structure which is deprecated.
INFO [org.netbeans.core.startup.NbEvents]: Turning on modules:
org.openide.util.lookup [8.33.1 201609300101]
org.openide.util [9.7.1 201609300101]
org.openide.util.ui [9.6.1 201609300101]
org.openide.modules [7.48.1 201609300101]
org.netbeans.api.annotations.common/1 [1.27.1 201609300101]
org.openide.filesystems [9.10.2 201705191307]
org.openide.awt [7.67.1 201609300101]
org.netbeans.api.progress/1 [1.47.1 201609300101]
org.netbeans.api.progress.nb [1.47.1 201609300101]
org.openide.dialogs [7.42.1 201609300101]
org.openide.nodes [7.45.1 201609300101]
org.openide.windows [6.75.1 201609300101]
org.netbeans.modules.editor.mimelookup/1 [1.40.1 201609300101]
org.openide.text [6.67.1 201609300101]
org.netbeans.swing.tabcontrol [1.56.1 201609300101]
org.netbeans.swing.outline [1.34.1 201609300101]
org.openide.explorer [6.62.1 201609300101]
org.openide.actions [6.39.1 201609300101]
org.netbeans.modules.queries/1 [1.43.1 201609300101]
org.netbeans.api.templates [1.7.1 201609300101]
org.openide.filesystems.nb [9.9.2 201612141242]
org.openide.loaders [7.66.1 201609300101]
org.netbeans.api.intent [1.2.1 201609300101]
org.netbeans.api.io [1.3.1 201609300101]
org.openide.io [1.49.1 201609300101]
org.openide.filesystems.compat8 [9.9.1 201609300101]
org.openide.execution [9.3.1 201609300101]
org.netbeans.upgrader [4.35.1 201609300101]
org.netbeans.swing.plaf [1.41.1 201609300101]
org.netbeans.modules.projectapi/1 [1.66.1 201609300101]
org.netbeans.swing.dirchooser [1.29.1 201609300101]
org.netbeans.spi.viewmodel/2 [1.51.1 201609300101]
org.netbeans.spi.tasklist/1 [1.35.1.1 1 201609300101]
org.netbeans.spi.quicksearch [1.27.1 201609300101]
org.netbeans.spi.palette/1 [1.46.1 201609300101]
org.netbeans.spi.navigator/1 [1.37.1 201609300101]
org.netbeans.modules.editor.settings/1 [1.56.1 201609300101]
org.netbeans.modules.editor.util/1 [1.64.1 201609300101]
org.netbeans.modules.editor.document [1.9.1.3 3 201609300101]
org.netbeans.modules.lexer/2 [1.63.1.1 1 201609300101]
org.netbeans.modules.editor.lib2/1 [2.16.3.56.3 56 201705191307]
org.netbeans.modules.editor.settings.lib [1.51.1.1 1 201609300101]
org.netbeans.modules.editor.fold/1 [1.45.1 201609300101]
org.netbeans.modules.editor.indent/2 [1.43.1 201609300101]
org.netbeans.modules.editor.guards/1 [1.33.1 201609300101]
答案1
根据发行说明Netbeans 8.2:
此版本经过测试的 JDK 是适用于 Windows、Linux 和 OS X 的 JDK 8u101。IDE 的 8.2 版本无法在早于 JDK 8 的 JDK 上安装或运行。
此外,Java 9 和 10 是非 LTS 版本的 Java,其生命周期分别在 2018 年 3 月和 2018 年 9 月终止。这就是为什么它们在 Ubuntu 的官方存储库中不可用的原因。
因此,如果您仍想使用 NetBeans 8.2,最好将其与 Java 8 一起使用。或者,如果您仍想使用 Java 8+,请使用 NetBeans 9.0 或 10.0。
进一步阅读: