Java Netbeans 上中央存储库的解包索引
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/50933665/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Unpacking index for Central Repository on Netbeans
提问by David Tarvin
I'm having a problem using Netbeans 8.2 on my High Sierra Macbook Air. When it opens it does a few startup things that seem to proceed normally, then it pauses for a minute or so, then it says "unpacking index for central repository." And that's where it gets stuck. It never completes that process, even after a few hours of sitting.
我在 High Sierra Macbook Air 上使用 Netbeans 8.2 时遇到问题。当它打开时,它会执行一些似乎正常进行的启动操作,然后它会暂停一分钟左右,然后它会说“为中央存储库解压缩索引”。这就是它卡住的地方。即使坐了几个小时,它也永远不会完成这个过程。
Here are some things that may or may not matter, but in case they're important:
以下是一些可能重要也可能无关紧要的事情,但以防万一它们很重要:
At the bottom of Netbeans, to the right of where the updating index message displays, there's a red word bubble with the number 1. The word bubble is there even before unpacking starts. When I click on it, it bring up a notification, but all the notification says is "left button."
I originally downloaded Netbeans a year or two ago for a Java class I was taking. At the time we were using Apache Tomcat for the server. I haven't tried to do anything with Apache recently.
I downloaded Glassfish about 4 months ago. Can't remember whether I was installing a new JDK or not. I had not used Netbeans since the first Java class, but I was taking a new Java class that had me update things. Don't know if I tried connecting to the Glassfish server (is that right?) or not. I didn't use Netbeans after that, though, because I was able to do my assignments on another computer that had Netbeans installed. I think Netbeans had worked at that point, though. I recall being able to bring up some code. Now, however, when I try to open a project, nothing happens.
在 Netbeans 的底部,在更新索引消息显示的右侧,有一个带有数字 1 的红色单词气泡。甚至在解包开始之前,气泡这个单词就已经存在了。当我点击它时,它会弹出一个通知,但所有的通知都是“左键”。
一两年前,我最初下载了 Netbeans,用于我正在学习的 Java 课程。当时我们使用 Apache Tomcat 作为服务器。我最近没有尝试用 Apache 做任何事情。
我大约 4 个月前下载了 Glassfish。不记得我是否安装了新的 JDK。自从第一个 Java 课程以来,我就没有使用过 Netbeans,但是我正在学习一个让我更新内容的新 Java 课程。不知道我是否尝试连接到 Glassfish 服务器(对吗?)。不过,在那之后我没有使用 Netbeans,因为我能够在另一台安装了 Netbeans 的计算机上完成我的作业。不过,我认为 Netbeans 在那时已经奏效了。我记得能够调出一些代码。但是,现在,当我尝试打开一个项目时,什么也没有发生。
Any help is appreciated.
任何帮助表示赞赏。
BTW, tried registering an account on netbeans.org to ask this question there, but I still have not received the verification email that will allow me to post.
顺便说一句,尝试在 netbeans.org 上注册一个帐户并在那里问这个问题,但我仍然没有收到允许我发帖的验证电子邮件。
回答by KevinB
I recently ran into this problem on CentOS. The root of the problem was that I was running out of disk space on my main drive (default tmp dir location).
我最近在 CentOS 上遇到了这个问题。问题的根源在于我的主驱动器上的磁盘空间不足(默认 tmp 目录位置)。
To fix, I modified the netbeans/etc/netbeans.conf
to specify a new tmp dir location in the netbeans_default_options
setting, adding:
为了解决这个问题,我修改了在netbeans/etc/netbeans.conf
设置中指定一个新的 tmp 目录位置netbeans_default_options
,添加:
-J-Djava.io.tmpdir=/my/new/tmpdir
=== Longer Explanation ===
=== 更长的解释 ===
When opening a Maven POM for the first time, NetBeans will pull a file from Maven Central and index it, using the tmp dir. On my machine, this indexing operation used almost 6GB of space, which was larger than I had available at the default java.io.tmpdir
location. Specifying a new location on a larger disk resolved the problem.
首次打开 Maven POM 时,NetBeans 将从 Maven Central 中提取文件并使用 tmp 目录对其进行索引。在我的机器上,这个索引操作使用了将近 6GB 的空间,这比我在默认java.io.tmpdir
位置可用的空间大。在更大的磁盘上指定一个新位置解决了这个问题。
The error message I received from NetBeans was misleading, because it claimed I did not have enough space in my ~/.cache/netbeans
dir to perform the cacheing. Changing the netbeans_default_cachedir
in netbeans.conf
did not resolve the issue. I had to manually watch for files being written to disk to find the problem and deduce it was the tmp dir running out of space, not the cache dir.
我从 NetBeans 收到的错误消息具有误导性,因为它声称我的目录中没有足够的空间~/.cache/netbeans
来执行缓存。更改netbeans_default_cachedir
innetbeans.conf
并没有解决问题。我不得不手动观察写入磁盘的文件以找到问题并推断出是 tmp 目录空间不足,而不是缓存目录。
Hope this helps!
希望这可以帮助!