Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2007-11-29
11
Medium Priority
?
1,121 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 17

Accepted Solution

by:
contactkarthi earned 1000 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 1000 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Suggested Courses

916 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