why two JRE's?

D

dima.hristov

When installing the J2SE Dev. Kit 5.0 Update3, it is installed
toghether with the so-called "private" JRE 5.0. Apart from that,
the installation program offers the possibility of installing a
standalone "public" JRE, which registers a Java Plug-in and Java
Web Start with the browsers.
Why does one need two JRE's? Isn't one enough? Why cannot I just
use the SDK and the public JRE to run my applications?
 
T

Thomas Fritsch

When installing the J2SE Dev. Kit 5.0 Update3, it is installed
toghether with the so-called "private" JRE 5.0. Apart from that,
the installation program offers the possibility of installing a
standalone "public" JRE, which registers a Java Plug-in and Java
Web Start with the browsers.
Why does one need two JRE's? Isn't one enough? Why cannot I just
use the SDK and the public JRE to run my applications?
One difference I know of:

In the private JRE ("C:\Programme\Java\jdk1.5.0\jre\" on my system)
the class files were compiled *with* debugging info (SourceFile,
LineNumberTable, ...). This JRE is meant to be used for developing,
because you can step through the JRE code with debuggers, and get
exception stack traces with line numbers.

In the public JRE ("C:\Programme\Java\jre1.5.0\" on my system)
the class files were compiled *without* debugging info. This JRE is
meant to be installed on customers' systems.
 
R

Roedy Green

Why does one need two JRE's? Isn't one enough? Why cannot I just
use the SDK and the public JRE to run my applications?

This has been a puzzle since day 1. Sun refers to the JRE in the JDK
as a private JRE for Javac, as if it might contain extra stuff only
Javac or the Sun JDK classes need.

Try doing a file compare on them to see if they are in any way
different.
 
J

Joan

When installing the J2SE Dev. Kit 5.0 Update3, it is installed
toghether with the so-called "private" JRE 5.0. Apart from
that,
the installation program offers the possibility of installing a
standalone "public" JRE, which registers a Java Plug-in and
Java
Web Start with the browsers.
Why does one need two JRE's? Isn't one enough? Why cannot I
just
use the SDK and the public JRE to run my applications?
I think it is just for convenience. The run time is not too big.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,600
Members
45,179
Latest member
pkhumanis73
Top