Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Does Eclipse has its internal Java JVM?

4 views
Skip to first unread message

www

unread,
Mar 7, 2007, 8:45:30 AM3/7/07
to
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

unread,
Mar 7, 2007, 8:49:50 AM3/7/07
to
www schrieb:

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

unread,
Mar 7, 2007, 9:11:33 AM3/7/07
to
Christian wrote:

> > 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

unread,
Mar 7, 2007, 9:57:15 AM3/7/07
to
Chris Uppal wrote:

> (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.

www

unread,
Mar 7, 2007, 10:07:18 AM3/7/07
to
Chris Uppal wrote:

> (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.


Message has been deleted

Lew

unread,
Mar 7, 2007, 10:13:58 AM3/7/07
to
www wrote:
> 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

Lew

unread,
Mar 7, 2007, 10:17:51 AM3/7/07
to
www wrote:
> 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:
> 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.

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

unread,
Mar 7, 2007, 10:55:30 AM3/7/07
to

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

unread,
Mar 7, 2007, 10:50:13 AM3/7/07
to
www wrote:

> 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


sdemc...@gmail.com

unread,
Mar 7, 2007, 12:22:25 PM3/7/07
to
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).

shei...@my-deja.com

unread,
Mar 7, 2007, 12:42:21 PM3/7/07
to

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


www

unread,
Mar 7, 2007, 12:44:05 PM3/7/07
to

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.

John W. Kennedy

unread,
Mar 7, 2007, 2:12:25 PM3/7/07
to
shei...@my-deja.com wrote:
> 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/.

--
John W. Kennedy
"The blind rulers of Logres
Nourished the land on a fallacy of rational virtue."
-- Charles Williams. "Taliessin through Logres: Prelude"

www

unread,
Mar 8, 2007, 9:20:03 AM3/8/07
to
Chris Uppal wrote:


> 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).

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

unread,
Mar 8, 2007, 12:53:59 PM3/8/07
to
www wrote:
> 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.

Chris Uppal

unread,
Mar 8, 2007, 2:01:30 PM3/8/07
to
www wrote:

> 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

0 new messages