views:

96

answers:

2

I'm trying to set up my dev environment on my new MBP which has 8GB of RAM. My IDE of choice is NetBeans 6.9 and I keep getting a memory exception (Permgen Outofmemory error) when I start an application through Tomcat 6.

Here's my netbeans.conf file:

netbeans_default_options="-J-Xms256m -J-Xmx2048m -J-XX:PermSize=32m -J-XX:MaxPermSize=512m -J-Xverify:none -J-Dapple.laf.useScreenMenuBar=true -J-XX:+UseConcMarkSweepGC -J-XX:+CMSClassUnloadingEnabled -J-XX:+CMSPermGenSweepingEnabled"

That hasn't done any good. I'm running Snow Leopard with all the latest patches and java version 1.6 as well as Tomcat 6.0.29. I'm guessing I'm setting the memory options in the wrong place, but where's the right place? Thanks for any suggestions!

A: 

in your tomcat dir, in bin/catalina.sh, you should see something like (at the top of the file)

 JAVA_OPTS='-Xms2048m -Xmx2048m -XX:PermSize=256m -XX:MaxPermSize=512m'

make it look exactly like that and see what happens.

hvgotcodes
+1  A: 

You can change the JVM settings in the IDE: in Services/Servers right-click on Apache Tomcat 6.0.26 and select Properties. In tab Platform you can change the JVM options.

Maurice Perry
Yep...that did it. Thanks.
jeffkolez