NetBeans7安装后的配置

当安装完netbean7后,第一次启动的时候会出现“JVM creation failed”的错误信息,如下的配置可以解决。

当打开项目的时候,有时候经常会卡住,这是因为分配的内存太低。

以上两个问题都是修改“etc\netbeans.conf”文件中的配置项“netbeans_default_options”。

# ${HOME} will be replaced by JVM user.home system property
netbeans_default_userdir="${HOME}/.netbeans/7.0"

# Options used by NetBeans launcher by default, can be overridden by explicit
# command line switches:
netbeans_default_options="-J-Dcom.sun.aas.installRoot=\"D:\Sun\AppServer\" -J-client -J-Xss2m -J-Xms32m -J-Xmx256m -J-XX:PermSize=32m -J-XX:MaxPermSize=320m -J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true"

# Note that a default -Xmx is selected for you automatically.
# You can find this value in var/log/messages.log file in your userdir.
# The automatically selected value can be overridden by specifying -J-Xmx here
# or on the command line.

# If you specify the heap size (-Xmx) explicitly, you may also want to enable
# Concurrent Mark & Sweep garbage collector. In such case add the following
# options to the netbeans_default_options:
# -J-XX:+UseConcMarkSweepGC -J-XX:+CMSClassUnloadingEnabled -J-XX:+CMSPermGenSweepingEnabled
# (see http://wiki.netbeans.org/FaqGCPauses)

# Default location of JDK, can be overridden by using --jdkhome
<dir>:
netbeans_jdkhome="C:\Program Files\Java\jdk1.6.0_26"

# Additional module clusters, using ${path.separator} (';' on Windows or ':' on Unix):
#netbeans_extraclusters="/absolute/path/to/cluster1:/absolute/path/to/cluster2"

# If you have some problems with detect of proxy settings, you may want to enable
# detect the proxy settings provided by JDK5 or higher.
# In such case add -J-Djava.net.useSystemProxies=true to the netbeans_default_options.

posted @ 2011-07-20 10:30  老徐d博客  阅读(1036)  评论(0编辑  收藏  举报