PDA

View Full Version : How to run Java applications in Fedora Core 3


smfinley
25th November 2004, 06:52 PM
If you have installed j2re-1_4_2_06-linux-i586-rpm.bin according to http://stanton-finley.net/fedora_core_3_installation_notes.html do the following:

Open a terminal. Type:

su -

Hit enter. Enter your root password. Type:

gedit /etc/profile.d/java.sh

Hit enter. In gedit type these lines:

export J2RE_HOME=/usr/java/j2re1.4.2_06
export PATH=$J2RE_HOME/bin:$PATH

Be sure to enter a carriage return after these lines. Click on the "save" icon in gedit and exit gedit. In the terminal type:

source /etc/profile.d/java.sh

Hit enter. Type:

which java

Hit enter. You should see:

/usr/java/j2re1.4.2_06/bin/java

Type:

alternatives --install /usr/bin/java java /usr/java/j2re1.4.2_06/bin/java 3

Hit enter. Type:

alternatives --config java

Hit enter. You should see:

There are 3 programs which provide 'java'.

Selection Command
-----------------------------------------------
1 /usr/share/java/libgcj-java-placeholder.sh
*+ 2 /usr/lib/jvm/jre-1.4.2-gcj/bin/java
3 /usr/java/j2re1.4.2_06/bin/java

Enter to keep the current selection[+], or type selection number:

Enter "3". Hit enter. Type:

/usr/sbin/alternatives --display java

Hit enter. You should see:

java - status is manual.
link currently points to /usr/java/j2re1.4.2_06/bin/java
/usr/share/java/libgcj-java-placeholder.sh - priority 100
slave rmiregistry: /usr/bin/grmiregistry
slave jre_exports: (null)
slave jre: (null)
slave rmiregistry.1.gz: /usr/share/man/man1/grmiregistry.1.gz
/usr/lib/jvm/jre-1.4.2-gcj/bin/java - priority 1420
slave rmiregistry: /usr/lib/jvm/jre-1.4.2-gcj/bin/rmiregistry
slave jre_exports: /usr/lib/jvm-exports/jre-1.4.2-gcj
slave jre: /usr/lib/jvm/jre-1.4.2-gcj
slave rmiregistry.1.gz: (null)
/usr/java/j2re1.4.2_06/bin/java - priority 3
slave rmiregistry: (null)
slave jre_exports: (null)
slave jre: (null)
slave rmiregistry.1.gz: (null)
Current `best' version is /usr/lib/jvm/jre-1.4.2-gcj/bin/java.

You should now be able to install and run Java applications such as Jalbum from http://jalbum.net/ in Fedora Core 3.

fibster
27th November 2004, 05:57 PM
If you have installed j2re-1_4_2_06-linux-i586-rpm.bin according to http://stanton-finley.net/fedora_core_3_installation_notes.html do the following:

Open a terminal. Type:

su -

Hit enter. Enter your root password. Type:

gedit /etc/profile.d/java.sh

Hit enter. In gedit type these lines:

export J2RE_HOME=/usr/java/j2re1.4.2_06
export PATH=$J2RE_HOME/bin:$PATH

Be sure to enter a carriage return after these lines. Click on the "save" icon in gedit and exit gedit. In the terminal type:

source /etc/profile.d/java.sh

Hit enter. Type:

which java

Hit enter. You should see:

/usr/java/j2re1.4.2_06/bin/java

Type:

alternatives --install /usr/bin/java java /usr/java/j2re1.4.2_06/bin/java 3

Hit enter. Type:

alternatives --config java

Hit enter. You should see:

There are 3 programs which provide 'java'.

Selection Command
-----------------------------------------------
1 /usr/share/java/libgcj-java-placeholder.sh
*+ 2 /usr/lib/jvm/jre-1.4.2-gcj/bin/java
3 /usr/java/j2re1.4.2_06/bin/java

Enter to keep the current selection[+], or type selection number:

Enter "3". Hit enter. Type:

/usr/sbin/alternatives --display java

Hit enter. You should see:

java - status is manual.
link currently points to /usr/java/j2re1.4.2_06/bin/java
/usr/share/java/libgcj-java-placeholder.sh - priority 100
slave rmiregistry: /usr/bin/grmiregistry
slave jre_exports: (null)
slave jre: (null)
slave rmiregistry.1.gz: /usr/share/man/man1/grmiregistry.1.gz
/usr/lib/jvm/jre-1.4.2-gcj/bin/java - priority 1420
slave rmiregistry: /usr/lib/jvm/jre-1.4.2-gcj/bin/rmiregistry
slave jre_exports: /usr/lib/jvm-exports/jre-1.4.2-gcj
slave jre: /usr/lib/jvm/jre-1.4.2-gcj
slave rmiregistry.1.gz: (null)
/usr/java/j2re1.4.2_06/bin/java - priority 3
slave rmiregistry: (null)
slave jre_exports: (null)
slave jre: (null)
slave rmiregistry.1.gz: (null)
Current `best' version is /usr/lib/jvm/jre-1.4.2-gcj/bin/java.

You should now be able to install and run Java applications such as Jalbum from http://jalbum.net/ in Fedora Core 3.
very easy i did this last night. go to freshrpms and get apt-get then update apt-get then install synaptic from synaptic u can install java and mozilla plugger i think it was called this has my firefox playing java games for the kids and i installed mplayer there also and mplayer pops up in firefox for movies. good luck to you.

tb

imdeemvp
27th November 2004, 10:18 PM

This is my problem i can see java working in jalbum but when i try this link http://www.bodo.com/javame.htm firefox says i need the plugin.

I had it working ok but i did something that mess it up and i dont have no idea what happened all the sudden it stop working and when i ran which java this is what i get:
[root@myfc3 ~]# which java
/usr/bin/which: no java in (/usr/java/j2re1.4.2_06/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/java/j2re1.4.2_06/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin)
NOTE i bold the no java in....???? what did i remove?

arpi
28th November 2004, 12:43 AM
i got mine working

i did what the first post said (everything as root ) but in the first selection command i used #2 to matrch the poster #3 option (choose the valid option by name). then (as root also):

cd /usr/lib/firefox-1.0/plugins
ln -s /usr/java/j2re1.4.2_06/plugin/i386/ns610-gcc32/libjavaplugin_oji.so

to test the jre go here:

http://www.java.com/en/download/help/testvm.jsp

mine works on firefox 1.0

when i type java -version i get:

Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_06-b03)
Java HotSpot(TM) Client VM (build 1.4.2_06-b03, mixed mode)

which means it is working but my html CD doesn't work with firefox. i got a cd that has welcome java plugin html and my java does not come on when reading the page on the CD. it must use an older java version (on the CD). what could i do to make it work? any ideas?

i got the jre from the sun website. it comes as a ~~~~.bin and when you run it you get an .rpm which the you install


good luck for the rest and thanks

PS: if you don't get your java working, install these rpms (from another post)
xorg-x11-deprecated-libs
xorg-x11-deprecated-libs-devel

imdeemvp
28th November 2004, 04:01 AM
After a couple of headaches I did revome j2re verison _05 and downloaded version _06 and now it works.....dont ask what went wrong becasue when i first installed it worked