Netbeans 模块开发内存不足
我正在 netbeans 中创建一个模块来帮助完成我正在处理的项目,但是当我在开发 IDE 中运行该模块时,我在加载资源时遇到内存不足异常。此过程似乎在基本 Netbeans 环境中工作正常,但是当我在模块开发期间进行相同的调用时,我收到错误。在尝试以几种不同的方式加载资产后,我尝试将以下内容附加到project.properties,然后附加到Netbeans Platform config(platform.properties),
netbeans_default_options="-J-Xms384m -J-Xmx1024m -J-XX:PermSize=32m -J-XX:MaxPermSize=96m -J-Xverify:none"
并且也尝试过
netbeans_default_options="-J-client -J-Xverify:none -J-Xmx1024m -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-XX:MaxPermSize=200m -J-Dapple.laf.useScreenMenuBar=true -J-Dsun.java2d.noddraw=true"
我也尝试过
test.run.args=-ea -Xms1024m -Xmx1024m
I am creating a module in netbeans to help with a project i am working on however when I run the module in the developmental IDE i get an out of memory exception while loading an asset. This procedure seems to work fine in the base netbeans environment but when i make the same calls during module development i get the error. After attempting to load the asset in several differnt ways i tried appending the following to project.properties and then to Netbeans Platform config(platform.properties)
netbeans_default_options="-J-Xms384m -J-Xmx1024m -J-XX:PermSize=32m -J-XX:MaxPermSize=96m -J-Xverify:none"
and also tried
netbeans_default_options="-J-client -J-Xverify:none -J-Xmx1024m -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-XX:MaxPermSize=200m -J-Dapple.laf.useScreenMenuBar=true -J-Dsun.java2d.noddraw=true"
I have also tried
test.run.args=-ea -Xms1024m -Xmx1024m
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我被这个问题困扰了一段时间。将这一行添加到project.properties中已经解决了问题:
run.args.extra=-J-Xms128m -J-Xmx512m -J-XX:MaxPermSize=512m
虽然它改进了堆内存大小,但显然问题已经消失,因为非堆内存增加了大小(J-XX:MaxPermSize=512m)。
祝你好运
I was stuck in this issue for a while. Adding this line into project.properties has solved the problem:
run.args.extra=-J-Xms128m -J-Xmx512m -J-XX:MaxPermSize=512m
While it improved the heap memory size, apparently the problem was gone because of the increased non-heap memory size (J-XX:MaxPermSize=512m).
Good luck
如果在开发 IDE 中安装模块时出现问题,您可以在
/etc/netbeans.conf
中配置最大堆大小和永久大小,方法是附加 < netbeans_default_options 变量的 code>-J-Xmx 和-J-XX:MaxPermSize
参数。您还应该附加-J-XX:+UseConcMarkSweepGC -J-XX:+CMSClassUnloadingEnabled -J-XX:+CMSPermGenSweepingEnabled
,如文档中所述(请参阅 http://wiki.netbeans.org/FaqGCPauses)。If the problem occurs when you install your module in the development IDE, you can configure the maximum heap size and perm size in
<netbeans-install-dir>/etc/netbeans.conf
by appending your-J-Xmx
and-J-XX:MaxPermSize
parameters to the netbeans_default_options variable. You should also append-J-XX:+UseConcMarkSweepGC -J-XX:+CMSClassUnloadingEnabled -J-XX:+CMSPermGenSweepingEnabled
, as noted in the docs (see http://wiki.netbeans.org/FaqGCPauses).我的 Linux Debian 上也有类似的内存问题。
仅适用于 linux / 可能是 UNIX 操作系统???
修复方法如下:
运行终端
以 root 身份登录
类型
crontab -e
< /p>滚动到底部或文件并输入
* * * * *sync;回声3> /proc/sys/vm/drop_caches
这条神奇的线每分钟都会清除所有未使用的内存。它删除了 NetBeans 产生的未使用内存(包括任何其他消耗内存的程序)。
请告诉我这是否有效。
Had a similar memory problem on my Linux Debian.
Only Works on linux / possibly UNIX OS's???
Here is how to fix it:
run a terminal
log in as root
type
crontab -e
scroll to the bottom or the file and type
* * * * * sync; echo 3 > /proc/sys/vm/drop_caches
This magic line cleared all unused ram every minute. It removed the unused memory NetBeans was producing (including any other memory-consuming programs).
plz tell me if this works.
netbeans 中内存不足异常的解决方案是![.....][1]
我已尝试通过设置项目属性。
右键单击项目 -->选择属性-->常规设置-->VM选项
添加以下参数-Xms256m -Xmx512m
solution to Out of memory exception in netbeans is![.....][1]
I have tried by setting project properties.
right click on project --> select Properties-->General Settings-->VM Options
Add below parameters -Xms256m -Xmx512m