Mário Kapusta
Mário Kapusta

Reputation: 508

How to increase max heap size of Java 6?

I have Java 6 web application(*.war) running on Jetty 8. In application I am caching(with EHCache) some data, but I need to increase max heap size because 1g is not enough. I need min 2g and max 4g.

The question is: how to setup this (if it is possible - step by step)?

(I was trying "java -Xmx4g -Xms2g" but it respond me that I need to specify file with main method which is imposible for war)

Upvotes: 0

Views: 341

Answers (1)

4J41
4J41

Reputation: 5095

Start jetty like this:

java -Xms2G -Xmx4G -jar start.jar

Upvotes: 1

Related Questions