Solved

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

Posted on 2007-11-29
11
1,110 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
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
 

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
groupSum5 challenge 5 84
thymeleaf natural templating vs JSP 2 95
eclipse java  build path 6 56
servlet example 11 40
For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

806 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