?
Solved

eclipse server separate jvm

Posted on 2014-02-19
4
Medium Priority
?
448 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

Not sure which OpenStack Certification to get?

So you’ve realized you might want to get certified in OpenStack, but you’re not sure what the benefits might be or even which one you should take. You know there are several certification courses you can choose from, but how do you know which one is right for you?

Question has a verified solution.

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

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
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…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses
Course of the Month12 days, 17 hours left to enroll

777 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