• Post Reply Bookmark Topic Watch Topic
  • New Topic

heap space  RSS feed

 
Isaac Ferguson
Ranch Hand
Posts: 1063
3
Java Netbeans IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I get the error:



I know that in order to fix it I need add something like java but in which file should I add something like this ?



Regards
 
Marco Ehrentreich
best scout
Bartender
Posts: 1294
IntelliJ IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Depending on what type of application you are talking about you can simply add this parameter to the 'java' command like 'java -Xmx1024m your.class.name.here'. For other environments like application servers etc. there are usually different configuration files where you can specify these settings. You can also specifiy the heap size if you start a Java application from within an IDE.

Marco
 
Isaac Ferguson
Ranch Hand
Posts: 1063
3
Java Netbeans IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using Eclipse. I have put in the Eclipse.ini java -Xmx2000m But it continues with the error


Regards,
 
Marco Ehrentreich
best scout
Bartender
Posts: 1294
IntelliJ IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are 2 possible reasons why it didn't fix the problem:

1) Your application really needs more memory (withour more details impossible to say). What do you think?

2) Now only Eclipse (the IDE) uses more memory but the applications you start from Eclipse use other settings. Unfortunately I don't have an Eclipse installation here to check where you can explicitly specify the JVM settings for a specific application. It's somewhere in the run configuration dialogs.


Marco
 
Isaac Ferguson
Ranch Hand
Posts: 1063
3
Java Netbeans IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

for example how I will increase it using Tomcat 7?

Regards,
 
Marco Ehrentreich
best scout
Bartender
Posts: 1294
IntelliJ IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My preferred way to configure Tomcat is to use the CATALINA_OPTS environment variable. For Linux systems you can add something like export CATALINA_OPTS="-Xmx1024m" to your bashrc script. On Windows you can add the variable like any other environment variable.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!