Solved

eclipse server separate jvm

Posted on 2014-02-19
4
422 Views
Last Modified: 2014-02-26
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
0
Comment
Question by:gudii9
  • 2
  • 2
4 Comments
 
LVL 19

Expert Comment

by:Ken Butters
ID: 39871756
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
 
LVL 7

Author Comment

by:gudii9
ID: 39881004
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
 
LVL 7

Author Comment

by:gudii9
ID: 39881480
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
 
LVL 19

Accepted Solution

by:
Ken Butters earned 500 total points
ID: 39881642
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

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Python Assistance 7 73
Free Alternative to JIRA 4 91
Non-recursive backtracking, using a stack 1 103
tomcat not starting 6 32
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
The viewer will learn how to implement Singleton Design Pattern in Java.

867 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now