Java Forum / General / March 2007
Does Eclipse has its internal Java JVM?
www - 07 Mar 2007 13:45 GMT Hi,
I am using Eclipse 3.2. I have heard that Eclipse has its own Java JVM. Since Java has gone from 1.5 to 1.6 already. Even Java 1.5 has several different updates. I am curious what version of JVM my Eclipse is using.
However, going to Window -> Preferences... -> Java -> Installed JREs, I saw it is pointed to /usr/local/jdk-1.5.0_04
Does this mean Eclipse is using JVM at /usr/local/jdk-1.5.0_04? This contradicts with my understanding that Eclipse has its internal Java JVM.
Could you help me understand? Thank you very much.
Christian - 07 Mar 2007 13:49 GMT www schrieb:
> Hi, > [quoted text clipped - 9 lines] > > Could you help me understand? Thank you very much. Eclipse uses what ever jre you give it. It has no own jvm... IBM has its own JVM, and IBM is part of eclipse project. But there is no IBM JVM bundled with eclipse.
Christian
Chris Uppal - 07 Mar 2007 14:11 GMT > > I am using Eclipse 3.2. I have heard that Eclipse has its own Java JVM. > [...] > Eclipse uses what ever jre you give it. It has no own jvm... Just to add to this. The chances are that the rumour "www" has heard is a holdover from Eclipse's predecessor, VAJ, which /did/ use its own internal JVM. Eclipse itself, as Christian says, uses [only] whatever external JVM you tell it to use.
(It does use its own internal Java compiler, though...)
-- chris
www - 07 Mar 2007 14:57 GMT > (It does use its own internal Java compiler, though...) Thank you. I was confused with internal Java compiler and Java JVM.
I am sorry. I am still not clear: what is the difference between Java compile(javac) and Java JVM?
When we say Java 1.5(or 5.0), does that mean Java JVM 1.5 or Java compiler 1.5 or both? Thank you.
Lew - 07 Mar 2007 15:13 GMT > I am sorry. I am still not clear: what is the difference between Java > compile(javac) and Java JVM? The compiler, javac, as the name implies, compiles source code to object code. The object code in this case is called "byte code".
The JVM executes byte code, i.e., actually runs the program.
> When we say Java 1.5(or 5.0), does that mean Java JVM 1.5 or Java > compiler 1.5 or both? Thank you. The JVM version is not the same as the Java compiler or language versions. Java 5 is the compiler version and is tightly connected to a language specification (JLS 3). The Java 5 SDK includes a compiler for source code that complies with that language specification. The Java 5 JRE includes a JVM that understands the class file format produced by the Java 5 compiler. I think the class file version is 49.0 from the Java 5 compiler but I may have that wrong.
I do not know how JVM versions run. In principle there could be new flavors of JVM released within the same language specification's lifetime. In practice a JVM that can run Java 6 class files works just fine on Java 5 or earlier class files also.
To complicate matters further, the language version encompasses the associated libraries. Methods in java.util.Date or wherever may become deprecated or vanish altogether as the language evolves. It is possible to compile a program '-source 1.4' and have it fail to run on JVMs for Java 1.4 because of rt.jar changes.
-- Lew
www - 07 Mar 2007 15:07 GMT > (It does use its own internal Java compiler, though...) Thank you. I was confused with internal Java compiler and Java JVM.
I am sorry. I am still not clear: what is the difference between Java compile(javac) and Java JVM?
When we say Java 1.5(or 5.0), does that mean Java JVM 1.5 or Java compiler 1.5 or both? Thank you.
I want to upgrade from Java 1.5 to Java 1.6. I am programming only standalone Java programs. On the Sun download web page: http://java.sun.com/javase/downloads/index.jsp
I think I need to download the first one "JDK 6". That will do it. But I am also curious, can I just download "Java Runtime Environment (JRE) 6"? In another words, I am not clear about the function of JRE.
Thank you for your help.
Lew - 07 Mar 2007 15:17 GMT > I am sorry. I am still not clear: what is the difference between Java > compile(javac) and Java JVM? > > When we say Java 1.5(or 5.0), does that mean Java JVM 1.5 or Java > compiler 1.5 or both? Thank you. I responded to your first post of these questions.
> I want to upgrade from Java 1.5 to Java 1.6. I am programming only > standalone Java programs. On the Sun download web page: [quoted text clipped - 3 lines] > am also curious, can I just download "Java Runtime Environment (JRE) 6"? > In another words, I am not clear about the function of JRE. From the very page to which you linked:
> The Java SE Runtime Environment (JRE) allows end-users to run Java applications. and
> The Java SE Development Kit (JDK) includes the Java Runtime Environment (JRE) and command-line development tools that are useful for developing applets and applications. -- Lew
Jason Cavett - 07 Mar 2007 15:55 GMT > > I am sorry. I am still not clear: what is the difference between Java > > compile(javac) and Java JVM? [quoted text clipped - 21 lines] > > -- Lew To expand on that - you'd be better off getting the JDK. As Lew said, the JDK includes a JRE. Additionally, if you use the JDK within Eclipse, Eclipse will be able to provide (better) context sensitive help due to the existance of documentation within the JDK which is not packaged with the JRE.
Chris Uppal - 07 Mar 2007 15:50 GMT > I am sorry. I am still not clear: what is the difference between Java > compile(javac) and Java JVM? > > When we say Java 1.5(or 5.0), does that mean Java JVM 1.5 or Java > compiler 1.5 or both? Thank you. Lew has already given you a lot of detail. Here's a slightly different view...
Every year or so, Sun release a new version of Java, both the language itself, and all the runtime machinery needed to execute programs written in the language. The runtime stuff is the JVM (you can think of that as the java.exe program), plus the runtime class libraries that your programs depend on.
When they release each version, then tend to do something stupidly confusing to the "official" names, which is why sensible programmers ignore what Sun say, and stick to using the 1.4, 1.5, 1.6 and so on names. Currently 1.4 is reaching the end of its life, 1.5 is current, 1.6 has recently come out, and 1.7 is not yet available.
When Sun make a new version, they release two different "products" for ordinary use. One is the "JRE" (which used to stand for Java Runtime Environment, but probably Sun have given it some different name now -- but it's still called "JRE"), and the other is the "JDK" (same point applies). The JRE is what end-users need on their machines in order to run Java programs, including ordinary programs (run with java.exe), clickable JAR files, applets, and Web Start applications. The JDK is what you, as a programmer, need in order to /write/ applications, it includes things like javac.exe (the Java compiler).
So users need a JRE, programmers need a JDK. So far, Sun have had the sense to keep the version numbers of the two products together. So if you have written your programs using a 1.5 JDK, then your users will need to install a 1.5 (or later) JRE. If you upgrade to developing using a 1.6 JDK, then (unless you take special steps) your users will have to upgrade to a 1.6 JRE.
One last thing. When you download and install a JDK, that includes a JRE as well -- in fact it normally includes /two/ JREs (yes, that's confusing too -- blame Sun). One of the JREs is exactly like the one that any ordinary user would get if they installed a JRE on their machine, and is installed in the same place; the other is put in the JDK installation directory so that the JDK can use it. (I suppose the idea of having two is that we can keep the "user" JRE clean for testing, while we can change options, and so on, in the development copy, but I'm not really sure).
-- chris
www - 07 Mar 2007 17:44 GMT > Lew has already given you a lot of detail. Here's a slightly different view... > [quoted text clipped - 34 lines] > > -- chris Thanks to everybody. I am so glad that I finally understand the concepts now.
I have been hired and has worked as Java programmer for half a year now. How lucky I am to get the job! Of course, I will study hard and work hard to pay back my kind-hearted manager.
www - 08 Mar 2007 14:20 GMT > When Sun make a new version, they release two different "products" for ordinary > use. One is the "JRE" (which used to stand for Java Runtime Environment, but [quoted text clipped - 4 lines] > Start applications. The JDK is what you, as a programmer, need in order to > /write/ applications, it includes things like javac.exe (the Java compiler). Sorry. I came another question: since I am using Eclipse which has its internal compiler. Now, even after I download JDK 1.6 (which has javac.exe version 1.6 and jre version 1.6), I can only "enjoy" newer version of jre. Newer version of javac.exe is meaningless to me, right? I am using Eclipse 3.2, the current version, but was released before Java 1.6 was released. I assume Eclipse internal compiler is at the same level as javac version 1.5. I am wondering when Eclipse organization will make its interval compiler as advanced as javac 1.6.
Thank you.
John W. Kennedy - 08 Mar 2007 17:53 GMT > I am wondering when Eclipse organization > will make its interval compiler as advanced as javac 1.6. The current level of Eclipse has supported java 6 for some time.
 Signature John W. Kennedy "The blind rulers of Logres Nourished the land on a fallacy of rational virtue." -- Charles Williams. "Taliessin through Logres: Prelude"
Chris Uppal - 08 Mar 2007 19:01 GMT > I am using Eclipse 3.2, the current version, but was released before > Java 1.6 was released. I assume Eclipse internal compiler is at the same > level as javac version 1.5. I am wondering when Eclipse organization > will make its interval compiler as advanced as javac 1.6. I think it already is at the same "level" as the compiler in Sun's 1.6 JDK. That's to say, there are various options for controlling what version of Java the Eclipse compiler recognises and generates code for (I can't remember where they are off-hand, but they are there in "Preferences" somewhere).
It is certainly possible that when a view version of Java comes out, and that version has changes to the language, that Eclipse will lag behind for a while. But that hasn't happened this time. (And it's not likely to happen very often or for very long, because Sun make early versions of their upcoming releases of Java available for a long time beforehand).
-- chris
sdemchenko@gmail.com - 07 Mar 2007 17:22 GMT To start Eclipse, you need JRE, but to compile Java code you do not necessarily need JDK, because Eclipse has its own built-in compiler ("incremental compiler", fully compliant with javac).
sheinrich@my-deja.com - 07 Mar 2007 17:42 GMT > Hi, > [quoted text clipped - 9 lines] > > Could you help me understand? Thank you very much. Hello,
you are probably referring to JDT (Java Development Tools) which are a subproject and default plugin of eclipse. I heard people prefer JDT to Sun's JDK as it is said to be somewhat faster.
http://www.eclipse.org/jdt/
Cheers, Steffen
John W. Kennedy - 07 Mar 2007 19:12 GMT > I heard people prefer JDT to Sun's JDK as it is said to be somewhat > faster. Humanly speaking, it's /much/ faster, because it continually compiles your code as you enter and revise it; as a result, you almost never wait for more than half a second. Eclipse just /sings/.
 Signature John W. Kennedy "The blind rulers of Logres Nourished the land on a fallacy of rational virtue." -- Charles Williams. "Taliessin through Logres: Prelude"
Free MagazinesGet these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...
|
|
|