How to set the Heap size in Java ?

Answers were Sorted based on User's Feedback



How to set the Heap size in Java ?..

Answer / ranganathkini

The heap size of the JVM can be set by specifying the
command-line flags -Xms and -Xmx

-Xms sets the initial heap size ( example: -Xms 30m )

-Xmx sets the maximum heap size ( example: -Xmx 70m )

Hope it helps! :)

Is This Answer Correct ?    11 Yes 0 No

How to set the Heap size in Java ?..

Answer / harish

set JAVA_OPTS=-server -Xmx700m

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More Core Java Interview Questions

How will you convert an ArrayList to Arrays?

4 Answers   KPIT,


What are the wrapped, classes?

0 Answers  


Give differences between Quicksort &Mergesort. When should these sorts be used andwhat is their running time in java?

0 Answers   Genpact,


What are parameters in a method?

0 Answers  


what is polymorhism what is inheritance? what is Abstract n Interface? what if two interfaces have same method and a concrete class is implementing both the interfaces. Will there be a compilation error? What are mutable and immutable classes? How can u make a class mutable? when will u use dem ...explain with example? what is overriding and overloading? what is garbage collection? what is Thread? how do dey communicate? what are the different ways of implementing ? have u used any messaging technologies? what is synchronization? what are some additions in java 1.5? what are generics? whst is advanced for loop? what is finally block? can u have a try in finally? yes!! can u have a finally in finally? how do you write junits? when is a object eligible for garbage collection?explain? a = null and b has ref to a will b be eligible to be garbage collected? sql questions like diff joins? how do dey work? exception handling? what is marker interface? what is the need??

0 Answers   JPMorgan Chase,


how to convert Java project into Maven ?

0 Answers   Infosys,


What is object in java?

0 Answers  


What is null object in java?

0 Answers  


what is session facade ?

3 Answers  


How we can run a jar file through command prompt in java?

0 Answers  


What is the size of a string in java?

0 Answers  


How do you reverse sort a list in java?

0 Answers  


Categories