How to install Java, on "Fedora Core 4" ?

A

AnonymousFC4

Hello:
this is somewhat a repost.
Could some one point me _exactly_ how to a good install java procedure on
FC4.
It seems I need to install the Java 1.5 java compiler instead of 1.4
===========================================================================
So far, I have the JRE 1.5 that I use mostly with Azureus.
The compiler seems to be 1.4

When I trace the JRE, it is 1.5.
The compiler seems Java 1.4

When I run a simple java program (from the Oreilly nutshell book), (compiles
ok) I get an exception...

java Factorial.class
Exception in thread "main" java.lang.NoClassDefFoundError: Factorial/class

It is very likely, that the code generated by 1.4 is incompatible with the
1.5 JRE !

The java compiler, seems to be part of the Eclipse RPM.
rpm -qf /usr/bin/ecj
eclipse-ecj-3.1.0_fc-0.M6.22
 
R

Raymond DeCampo

AnonymousFC4 said:
Hello:
this is somewhat a repost.
Could some one point me _exactly_ how to a good install java procedure on
FC4.
It seems I need to install the Java 1.5 java compiler instead of 1.4
===========================================================================
So far, I have the JRE 1.5 that I use mostly with Azureus.
The compiler seems to be 1.4

When I trace the JRE, it is 1.5.
The compiler seems Java 1.4

When I run a simple java program (from the Oreilly nutshell book), (compiles
ok) I get an exception...

java Factorial.class
Exception in thread "main" java.lang.NoClassDefFoundError: Factorial/class

It is very likely, that the code generated by 1.4 is incompatible with the
1.5 JRE !

The java compiler, seems to be part of the Eclipse RPM.
rpm -qf /usr/bin/ecj
eclipse-ecj-3.1.0_fc-0.M6.22

The syntax of the command you have used to invoke the java executable is
incorrect.

HTH,
Ray
 
A

AnonymousFC4

Raymond said:
The syntax of the command you have used to invoke the java executable is
incorrect.

java Factorial
yield the same result: an exception (with the line No).
 
J

Jon Martin Solaas

AnonymousFC4 said:
Hello:
this is somewhat a repost.
Could some one point me _exactly_ how to a good install java procedure on
FC4.
It seems I need to install the Java 1.5 java compiler instead of 1.4
===========================================================================
So far, I have the JRE 1.5 that I use mostly with Azureus.
The compiler seems to be 1.4

When I trace the JRE, it is 1.5.
The compiler seems Java 1.4

When I run a simple java program (from the Oreilly nutshell book), (compiles
ok) I get an exception...

java Factorial.class
Exception in thread "main" java.lang.NoClassDefFoundError: Factorial/class

It is very likely, that the code generated by 1.4 is incompatible with the
1.5 JRE !

Is it really likely that every java-program in the world would have to
be re-compiled in order to support Java 5 (jdk/jre 1.5)? Ofcourse not,
in fact 1.4 classes run just fine on 1.5.

The easiest way to install java on FC4 is in my opinion to download the
jdk tar from sun and just unpack in /usr/local/java/ or something and
run the installer there. Then just make sure you have
/usr/local/java/[jdk-xyz]/bin first in your path, and JAVA_HOME set to
/usr/local/java/[jdk-xyz].
The java compiler, seems to be part of the Eclipse RPM.
rpm -qf /usr/bin/ecj
eclipse-ecj-3.1.0_fc-0.M6.22

Just don't use the java-stuff that comes bundled with FC4, unless you
really have a good reason to. Downloading what you need directly from
sun,Apache,Jboss,Eclipse,Netbeans or whatever, and unpack it in
/usr/local/java will work flawlessly. Sooner or later you'll end up
needing stuff that's not available in rpm-format anyway. If I'm not
entirely mistaken, the java-support in FC3 was pretty different from
that in FC4, so when upgrading (or re-installing) you'd basically have
to adapt to an entirely new java environment. If you have your own
java-stuff in /usr/local you'd just have to hook it into your new
/usr/local and you'd be all set. Ofcourse, it'd be just as simple to
switch to another distro, or you can up or downgrade to pretty much any
java compiler you'd like to use without waiting for an rpm to be
prepared by someone etc. etc.

With that said, I also would like to add that FC really makes an effort
to support Java in their distro, which is very important. The more users
that can run java out-of-the-box the better. However, not all developers
prefer to use the exact tools that comes bundled with FC4, and then it
is very convenient that other jdks, apps and libs are easily available
and installs in a breeze from plain old compressed archives. (And just
for the record, for most other purposes I'm perfectly happy with just
using rpm-packages like everyone else.)
 
R

Raymond DeCampo

AnonymousFC4 said:
Raymond DeCampo wrote:




java Factorial
yield the same result: an exception (with the line No).

This is not the *same* result. It is a different result that is not the
result you desire. It would be helpful if you posted the actual result.

Ray
 
D

Daniel Rohe

1. Download the bin from Sun's homepage as normal user
2. Download the source-rpm from jpackage.org
(http://www.jpackage.org/rpm.php?id=2663) as normal user
3. Follow the instructions on how to rebuild a package
(http://www.jpackage.org/rebuilding.php) as normal user
4. Install the rebuild packages from rpm/RPMS as root
5. Test your installation with "java -version" as normal user

Kind regards,
Daniel

Jon Martin Solaas said:
AnonymousFC4 said:
Hello:
this is somewhat a repost.
Could some one point me _exactly_ how to a good install java procedure on
FC4.
It seems I need to install the Java 1.5 java compiler instead of 1.4
===========================================================================
So far, I have the JRE 1.5 that I use mostly with Azureus.
The compiler seems to be 1.4

When I trace the JRE, it is 1.5.
The compiler seems Java 1.4

When I run a simple java program (from the Oreilly nutshell book),
(compiles
ok) I get an exception...

java Factorial.class
Exception in thread "main" java.lang.NoClassDefFoundError:
Factorial/class

It is very likely, that the code generated by 1.4 is incompatible with
the
1.5 JRE !

Is it really likely that every java-program in the world would have to be
re-compiled in order to support Java 5 (jdk/jre 1.5)? Ofcourse not, in
fact 1.4 classes run just fine on 1.5.

The easiest way to install java on FC4 is in my opinion to download the
jdk tar from sun and just unpack in /usr/local/java/ or something and run
the installer there. Then just make sure you have
/usr/local/java/[jdk-xyz]/bin first in your path, and JAVA_HOME set to
/usr/local/java/[jdk-xyz].
The java compiler, seems to be part of the Eclipse RPM.
rpm -qf /usr/bin/ecj
eclipse-ecj-3.1.0_fc-0.M6.22

Just don't use the java-stuff that comes bundled with FC4, unless you
really have a good reason to. Downloading what you need directly from
sun,Apache,Jboss,Eclipse,Netbeans or whatever, and unpack it in
/usr/local/java will work flawlessly. Sooner or later you'll end up
needing stuff that's not available in rpm-format anyway. If I'm not
entirely mistaken, the java-support in FC3 was pretty different from that
in FC4, so when upgrading (or re-installing) you'd basically have to adapt
to an entirely new java environment. If you have your own java-stuff in
/usr/local you'd just have to hook it into your new /usr/local and you'd
be all set. Ofcourse, it'd be just as simple to switch to another distro,
or you can up or downgrade to pretty much any java compiler you'd like to
use without waiting for an rpm to be prepared by someone etc. etc.

With that said, I also would like to add that FC really makes an effort to
support Java in their distro, which is very important. The more users that
can run java out-of-the-box the better. However, not all developers prefer
to use the exact tools that comes bundled with FC4, and then it is very
convenient that other jdks, apps and libs are easily available and
installs in a breeze from plain old compressed archives. (And just for the
record, for most other purposes I'm perfectly happy with just using
rpm-packages like everyone else.)
 
J

Jon Martin Solaas

Daniel said:
1. Download the bin from Sun's homepage as normal user
2. Download the source-rpm from jpackage.org
(http://www.jpackage.org/rpm.php?id=2663) as normal user
3. Follow the instructions on how to rebuild a package
(http://www.jpackage.org/rebuilding.php) as normal user
4. Install the rebuild packages from rpm/RPMS as root
5. Test your installation with "java -version" as normal user

Kind regards,
Daniel

I'm sure it works, but the bin-installer from Sun works just fine for me :)
 

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,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top