Netbeans Module Development out of memory
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 -开发者_Go百科J-Dsun.java2d.noddraw=true"
I have also tried
test.run.args=-ea -Xms1024m -Xmx1024m
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
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).
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.
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
精彩评论