eclipse server separate jvm

How and who allocate memory to JVM.
When the JVM starts ? is it at the start of the eclipse or is it start of the web or application server like tomcat/weblogic etc within the eclipse.
Is there is separate jvm for eclipse and web or application server?


Within eclipse when i  include and start up a webserver, like Apache Tomcat is  there is a  sepatate JVM for the web server/application server. Does the memory allocated to that specific separate JVM may need to be adjusted for this specific situation inside eclipse.init .

At any moment how to find out which JVM is using how much memory. Is there is a posibility that specific jvm can use less than Initial Memory?

please advise
Any links resources ideas highly appreciated. Thanks in advance
LVL 7
gudii9Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Ken ButtersConnect With a Mentor Commented:
The optimal value for heap allocation will vary from project to project.  

In order to find out what memory would be optimal for your project you would have to do some profiling of your app.

I've never done that myself... but did find some links that might be of interest:

0
 
Ken ButtersCommented:
How and who allocate memory to JVM.
The memory is allocated to the JVM when the JVM starts up.  The JVM starts up when you execute "java.exe".

In eclipse... if you don't specify any VMargs to override it... the amount of initial and the amount of max memory allocated to the JVM heap is defined by the eclipse.ini file.

When you are running a Java Application you can set your JVM's in the run configuration for that app.

When you are running a web server you can set the JVM arguments in that web server.
Here is an example of setting the Heap size for a tomcat server.
http://viralpatel.net/blogs/setting-tomcat-heap-size-jvm-heap-eclipse/


When the JVM starts ? is it at the start of the eclipse or is it start of the web or application server like tomcat/weblogic etc within the eclipse.
Is there is separate jvm for eclipse and web or application server?
Yes when the JVM starts according to whatever arguments are sent to java.exe.  
Those arguments can be determined by eclipse.ini or overridden for a specific application by adding JVM arg as specified in answer to prior question.


Within eclipse when i  include and start up a webserver, like Apache Tomcat is  there is a  sepatate JVM for the web server/application server. Does the memory allocated to that specific separate JVM may need to be adjusted for this specific situation inside eclipse.init .
There is one JVM that is started.  if you are running a webserver, the webserver will start an instance of the JVM by executing java.exe.

You need to worry about adding more memory if your application is getting out of memory errors. (unless your application is not working correctly).


At any moment how to find out which JVM is using how much memory. Is there is a posibility that specific jvm can use less than Initial Memory?

I haven't used it myself, but JConsole can show you how much memory the JVM is using.  Here is some documentation on it.
http://docs.oracle.com/javase/6/docs/technotes/guides/management/jconsole.html
0
 
gudii9Author Commented:
when i tried to launch on tomcat 6 instead of  i got error as below

Tomcat version 6.0 only supports J2EE 1.2, 1.3, 1.4, and Java EE 5 Web modules

Please advise on how to fix
0
 
gudii9Author Commented:
I used tomcat 7 and went to the Arguments as given in link
http://viralpatel.net/blogs/setting-tomcat-heap-size-jvm-heap-eclipse/

what is the optimal value i should give there.

The link gave valie
-Xms 64 -Xmx254

Please advise
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.