Netbeans 8.1 无法通过“打开模块”屏幕

Netbeans 8.1 无法通过“打开模块”屏幕

本周,我在全新安装的 ubuntu 18.04 中安装了 netbeans 8.1。在此之前,我已经安装了 jdk、jre 并配置了 JAVA_HOME 变量。尝试打开 netbeans 后,我得到了 netbeans 加载屏幕。然而,当加载屏幕显示“打开模块”时,过一会儿 netbeans 就会关闭。我试过通过终端启动它,但没有出现任何错误。但是,我在 netbeans var 文件夹中找到了这个文本文件

消息日志

>Log Session: Tuesday, May 15, 2018 3:16:49 PM EEST
>System Info: 
  Product Version         = NetBeans IDE 8.1 (Build 20180221-debian-8.1)
  Operating System        = Linux version 4.15.0-20-generic running on amd64
  Java; VM; Vendor        = 1.8.0_171; Java HotSpot(TM) 64-Bit Server VM 25.171-b11; Oracle Corporation
  Runtime                 = Java(TM) SE Runtime Environment 1.8.0_171-b11
  Java Home               = /usr/lib/jvm/java-8-oracle/jre
  System Locale; Encoding = en_US (nb); UTF-8
  Home Directory          = /home/mkcodergr
  Current Directory       = /home/mkcodergr/Documents/GitHub/eduonix-projects/blogapp
  User Directory          = /home/mkcodergr/.netbeans/8.1
  Cache Directory         = /home/mkcodergr/.cache/netbeans/8.1
  Installation            = /usr/share/netbeans/8.1/nb
                            /usr/share/netbeans/8.1/ide
                            /usr/share/netbeans/8.1/java
                            /usr/share/netbeans/8.1/apisupport
                            /usr/share/netbeans/8.1/harness
                            /usr/share/netbeans/8.1/platform
  Boot & Ext. Classpath   = /usr/lib/jvm/java-8-oracle/jre/lib/resources.jar:/usr/lib/jvm/java-8-oracle/jre/lib/rt.jar:/usr/lib/jvm/java-8-oracle/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jsse.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jce.jar:/usr/lib/jvm/java-8-oracle/jre/lib/charsets.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jfr.jar:/usr/lib/jvm/java-8-oracle/jre/classes:/usr/lib/jvm/java-8-oracle/jre/lib/ext/cldrdata.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/zipfs.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/jfxrt.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/localedata.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/dnsns.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/nashorn.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/jaccess.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunec.jar
  Application Classpath   = /usr/share/java/jcodings.jar:/usr/share/netbeans/8.1/platform/lib/boot.jar:/usr/share/netbeans/8.1/platform/lib/org-openide-modules.jar:/usr/share/netbeans/8.1/platform/lib/org-openide-util.jar:/usr/share/netbeans/8.1/platform/lib/org-openide-util-lookup.jar:/usr/share/netbeans/8.1/platform/lib/org-openide-util-ui.jar:/usr/lib/jvm/java-8-oracle/lib/dt.jar:/usr/lib/jvm/java-8-oracle/lib/tools.jar
  Startup Classpath       = /usr/share/netbeans/8.1/platform/core/org-netbeans-libs-asm.jar:/usr/share/netbeans/8.1/platform/core/core.jar:/usr/share/netbeans/8.1/platform/core/asm-all-5.0.1.jar:/usr/share/netbeans/8.1/platform/core/org-openide-filesystems.jar:/usr/share/netbeans/8.1/platform/core/org-openide-filesystems-compat8.jar:/usr/share/netbeans/8.1/platform/core/core-base.jar:/usr/share/netbeans/8.1/nb/core/org-netbeans-upgrader.jar:/usr/share/netbeans/8.1/nb/core/locale/core_nb.jar
-------------------------------------------------------------------------------
INFO [org.netbeans.modules.netbinox]: Install area set to file:/usr/share/netbeans/8.1/
java.lang.NullPointerException
    at org.eclipse.osgi.baseadaptor.BaseAdaptor.initializeStorage(BaseAdaptor.java:123)
    at org.eclipse.osgi.framework.internal.core.Framework.<init>(Framework.java:192)
    at org.eclipse.osgi.framework.internal.core.EquinoxLauncher.internalInit(EquinoxLauncher.java:67)
    at org.eclipse.osgi.framework.internal.core.EquinoxLauncher.init(EquinoxLauncher.java:37)
    at org.eclipse.osgi.launch.Equinox.init(Equinox.java:178)
    at org.netbeans.modules.netbinox.Netbinox.init(Unknown Source)
    at org.netbeans.core.netigso.Netigso.prepare(Unknown Source)
    at org.netbeans.NetigsoHandle.turnOn(Unknown Source)
    at org.netbeans.ModuleManager.enable(Unknown Source)
INFO [null]: Last record repeated again.
    at org.netbeans.core.startup.ModuleList.installNew(Unknown Source)
    at org.netbeans.core.startup.ModuleList.trigger(Unknown Source)
    at org.netbeans.core.startup.ModuleSystem.restore(Unknown Source)
    at org.netbeans.core.startup.Main.getModuleSystem(Unknown Source)
INFO [null]: Last record repeated again.
    at org.netbeans.core.startup.Main.start(Unknown Source)
    at org.netbeans.core.startup.TopThreadGroup.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:748)

知道为什么会发生这种情况吗?

答案1

我建议大家阅读评论中发布的聊天内容。我无法修复 netbeans 8.1。我所做的是从网站下载最新版本(8.2)并使用 bash 脚本安装它。但是打开 netbeans 8.2 后我无法创建新项目。

然后我发现了以下堆栈溢出问题:https://stackoverflow.com/questions/46476470/cant-create-project-on-netbeans-8-2

总之,我要做的是找到我的 netbeans.conf 文件并更改我的 java_home 路径

聊天

答案2

我最近遇到了这个问题,删除缓存文件夹没有帮助。

因此,我通过删除(备份后)文件夹中最近创建的一些模块解决了这个问题$HOME/.netbeans/8.2/modules

相关内容