Visit Our UNIX and Linux User Community

java.lang.OutofMemoryError in Sun Studio 12

Thread Tools Search this Thread
Operating Systems Solaris java.lang.OutofMemoryError in Sun Studio 12
# 1  
Old 12-19-2007
Question java.lang.OutofMemoryError in Sun Studio 12

Hello everyone,

I have installed Sun Studio 12 in my Sun Solaris 10 (x86) OS. At first, there was nothing wrong with it but recently, I couldn't open the Sun Studio IDE. When I try to open it, I keep on getting the following error messages:

java.lang.OutOfMemoryError: Java heap space
at org.netbeans.core.LoaderPoolNode.load(
at org.netbeans.core.startup.Main.start(

I found some suggestions in a thread, like adjusting the heap size using the -J-Xms and -J-Xmx options when running sunstudio, specifying the desired heap size in the netbeans.conf file, and adding more swap space through mkfile. However, these didn't solve the problem.

I tried running the NetBeans IDE and it's working perfectly.

Anybody here who might know why? I would really appreciate your help.
Thank you very much!

# 2  
Old 12-19-2007
What are your Xmx and Xmx setting at now? I have never seen the '-j' in the -j-Xmx you posted used. How does that compare with when you lauch a normal netbeans?

The second thing is that it not unusual to need to set the minimum heap size to the same value as maximum, becasue the JVM is not always able to re-allocate correctly at runtime.

As things stand adding swap will not make any difference, it is only the heap size that is a problem, if you were running out of swap you would get "java.lang.OutOfMemoryError: Insufficient Space to grow Heap"
# 3  
Old 12-19-2007
Hello reborg,

I switched back my Xms and Xmx settings to the default ones (-J-Xms32m -J-Xmx128m). Before, I tried this suggestion at the Sun Studio Tools Forum:

I would recommend to try 512m first:
/opt/SUNWspro/bin/sunstudio -J-Xms256m -J-Xmx512m

Setting maximum JVM heap size to 1Gb might sometimes cause performance issues.

I'd also like to mention that these settings can easily be changed in
so that you don't have to specify them in command line each time.

The swap -l command often gives this result:
swapfile dev swaplo blocks free
/dev/dsk/c1d0s1 102,1 8 1060280 1060280

The df -k command gives me this:
Filesystem kbytes used avail capacity Mounted on
swap 988464 852 987612 1% /etc/svc/volatile

Thank you for your help. ^-^

Previous Thread | Next Thread
Test Your Knowledge in Computers #348
Difficulty: Easy
Awk's built-in variables include the field variables: $1, $2, $3, and so on ($0 represents the entire record).
True or False?

7 More Discussions You Might Find Interesting

1. AIX

VIOS - Error 500: java.lang.OutOfMemoryError

Hey buddies, I'd love to seek and destroy the cause of this error > . < I get this in my browser (Error 500: java.lang.OutOfMemoryError) when I unsuccessfully try to access my Vios - IVM adress :( To recover access to IVM adress I have to enter "oem_setup_env" mode and "kill -9 java's... (3 Replies)
Discussion started by: Xscaio
3 Replies

2. Solaris

Sun One Studio 12

Hi, Do you know where I can get a copy of Sun One Studio 12? I've looked on the Oracle Website but cannot find it to download!:confused: Thanks, Sparcman (1 Reply)
Discussion started by: sparcman
1 Replies

3. Solaris

Sun Studio 11 in OpenSolaris

Install Sun Studio 11 on OpenSolaris 2009.06 When run IDE - system return error: touch: cannot change times on /export/home/iktomy/.sunstudio/11-SunOS-i386/system/dontshowisw: Permission denied /opt/SUNWspro/prod/scripts/jdk_chooser: line 131: cat: command not found... (0 Replies)
Discussion started by: Iktomy
0 Replies

4. Solaris

Sun Studio 10 + Boost 1.36

Is it possible to build Boost 1.35 using Sun Studio 10? I can build Boost 1.35 using Sun Studio 11 successful. However, i'm unable to build it using Sun Studio 10 using the exact method. I really apprecaite if any expert can help on this. Thanks, (2 Replies)
Discussion started by: shingpui
2 Replies

5. Solaris

Sun Studio problem

I am using Sun Studio. But there is problem with it. When my PC is connected to INTERNET then there is no problem in starting Sun Studio. But When my PC is not connected to INTERNET then there is problem in starting Sun Studio. With out INTERNET i run sunstudio but after waiting long time nothing... (0 Replies)
Discussion started by: mansoorulhaq
0 Replies

6. UNIX for Dummies Questions & Answers

Receiving error on Unix server-- java.lang.UnsatisfiedLinkError: registerNatives

Hi all, This is my first shell script, so I'm hoping the problem is that I'm just missing something, and not something bigger. I have a Java application that I wrote in WSAD that reads data from an Excel file and inserts values into a DB2 database. I'm able to run it successfully in WSAD. I... (4 Replies)
Discussion started by: loveToBlade
4 Replies

7. UNIX for Dummies Questions & Answers

java.lang.System when running jar

Hello, I recieve the following error when trying to run the following command in a ksh. The operating system is AIX5.1. /usr/bin/jar -xvf {filename}.zip Can't find class java.lang.System But when I run it on the command line it unzips the file fine. Does anybody know why this... (2 Replies)
Discussion started by: ctcuser
2 Replies

Featured Tech Videos