Solved

How to handle java.lang.OutOfMemoryError: PermGen space Error.

Posted on 2007-11-29
11
1,108 Views
Last Modified: 2013-11-23
I am getting "java.lang.OutOfMemoryError: PermGen space" Error .in java.
How do iit goes away?
Thanks
0
Comment
Question by:Anj78
11 Comments
 
LVL 17

Expert Comment

by:contactkarthi
ID: 20374687
set maxpermsise while running the program

-XX:MaxPermSize=256m
0
 

Author Comment

by:Anj78
ID: 20374742
where exactly.
Thanks
0
 

Author Comment

by:Anj78
ID: 20374866
I am waiting for respose.I didnt file the location where i have to set the above  MemSize.
Thanks.
0
 
LVL 17

Accepted Solution

by:
contactkarthi earned 250 total points
ID: 20375116
java -XX:MaxPermSize=256m MyProgramName

MyProgramName is the class file you are running
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:Anj78
ID: 20375805
java -XX:MaxPermSize=256m MyProgramName
 The above command tried .But still getting the same error
Thanks.
0
 
LVL 8

Expert Comment

by:malfunction84
ID: 20375960
Try increasing the number to 512m.  If you continue to get the same error, you might have a memory leak.  Check for collections (Lists, Maps, etc) that grow continually, never having elements removed.
0
 

Author Comment

by:Anj78
ID: 20376050
i am running the java application and not running through  eclipse.Can any body help me to find out the solution.
Thanks.
0
 

Author Comment

by:Anj78
ID: 20376105
%JREDIR%\bin\java -Xms128M -Xmx512M %SYSTEMPROP% %ENVPROP% -Dcom.pjx.ejb.server.Embedded=true -Djava.security.policy=%POLICY% -Djava.ext.dirs=%EXTDIRS% -Dcom.pjx.bootstrap.ProcessName=%PROCESS% -Dsubstitution.RUNDIR=%RUNDIR% -Dsubstitution.JAVADIR=%JAVADIR% -Dcom.pjx.help.server.Release=7 com.pjx.bootstrap.DevLauncher

This is what is there bu default in run file.Now i am still getting error.
do i am setting the right place?
0
 
LVL 92

Assisted Solution

by:objects
objects earned 250 total points
ID: 20377978
> This is what is there bu default in run file.Now i am still getting error.
> do i am setting the right place?

I don't see "-XX:MaxPermSize=256m" being specified in the command line you just posted.

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now