Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2007-11-29
11
Medium Priority
?
1,118 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Suggested Courses

730 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