LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-12-2004, 10:41 AM   #1
n_hendrick
Member
 
Registered: Jan 2004
Location: Canal Fulton OH.
Distribution: Ubuntu 15.04, Gentoo
Posts: 68

Rep: Reputation: 15
j2re install


I'm having trouble getting java functionality in gnome under redhat 9.0, I've tried just about everything but for some reason java isn't even showing up in my other applications either, is there a path variable I have to change, or am I just hopeless. I've tried the binary executable and the rpm both give me no results.
 
Old 02-12-2004, 11:28 AM   #2
nikolaus
LQ Newbie
 
Registered: Feb 2004
Location: Cologne / Germany
Distribution: rh9, rh-adv3, suse9, sles8
Posts: 16

Rep: Reputation: 0
jre installation / usage

Make sure that and where the jre is installed.
Has it been installed using the RPM, type
rpm -qa | grep -i jre
If something like "java2-jre-1.4.2" shows up, it is installed.

Now, ask the PRM database for the location the JRE files have been
installed to: rpm -ql java2-jre | more
You should find a subdirectory named "jre/bin" somewhere in the output.

Usually, a link "/usr/lib/java" is created during installation of the os and/or
java jre and points to the "right" directory.

If you installed by tar.gz package, use the "find" command to locate the packages installation location:

find /opt /usr -name "jre" -type d

Now when we are that an jre is installed, we check for a sufficient search path.

Log on as a simple "user" - avoid using the "root" account whenever possible. Type in
echo $PATH | grep java
You should find something like ":/usr/lib/java/jre/bin:" in the output. If, you should then try to call "java -version" and see output like this:

Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
...

If not, consider to download the Sun JRE RPM from http://java.sun.com/j2se/1.4.2/download.html.
(Locate the string "Download J2SE v 1.4.2_03" and click at the link "download" below the word "JRE". Read and accept the license agreement. Select "RPM in self-extracting file" for download.

Install that file as user "root"!
 
Old 02-12-2004, 11:36 AM   #3
n_hendrick
Member
 
Registered: Jan 2004
Location: Canal Fulton OH.
Distribution: Ubuntu 15.04, Gentoo
Posts: 68

Original Poster
Rep: Reputation: 15
thanks I'll try that.
 
Old 02-12-2004, 12:01 PM   #4
n_hendrick
Member
 
Registered: Jan 2004
Location: Canal Fulton OH.
Distribution: Ubuntu 15.04, Gentoo
Posts: 68

Original Poster
Rep: Reputation: 15
okay, I did the above....everythings installed and path is functioning but when I go to type java -version I get a 1.3.1 listing for gcj and it says java version 1.3.1 now when I go into the directory of java 1.4.2 and type java version I get Java Runtime 1.4.2, I don't know if this has anything to do with the browser and software problem or not, but the installed Java Runtime appears to be unaccessible, could I always uninstall the java gcj for RedHat 3.2 or should I try something else. I'm not sure how to get rid of this ancient java but is there anything else I can do?
 
Old 02-13-2004, 03:49 PM   #5
nikolaus
LQ Newbie
 
Registered: Feb 2004
Location: Cologne / Germany
Distribution: rh9, rh-adv3, suse9, sles8
Posts: 16

Rep: Reputation: 0
You can uninstall the ancient java. Usually java programs coded for 1.3.x will run without any harm within the 1.4.x VM. A small (and shrinking) number of applets coded for jre 1.1 won't run within 1.3, 1.4 VM.

To set the default VM to "1.4.2", you need to set the link "/usr/lib/java" to the "right" VMs directory.

To demonstrate the dependancies, i prepared some lines of output from the command sequence "cd /usr/lib; ls -ld java SunJava*".
Here, the default VM is set to "1.3.1", since the link "java" points to the link "SunJava2-1.3" wich points to the directory "SunJava2-1.3.1".

lrwxrwxrwx 1 root root 12 Feb 8 01:47 SunJava2 -> SunJava2-1.3
lrwxrwxrwx 1 root root 14 Feb 7 23:51 SunJava2-1.3 -> SunJava2-1.3.1
lrwxrwxrwx 1 root root 14 Feb 7 23:51 SunJava2-1.4 -> SunJava2-1.4.2
drwxr-xr-x 3 root root 72 Feb 7 23:51 SunJava2-1.3.1
drwxr-xr-x 3 root root 72 Feb 7 23:51 SunJava2-1.4.2
lrwxrwxrwx 1 root root 14 Aug 11 2002 java -> SunJava2-1.3.1

To select "1.4.2" as default VM, i would log on as root and
call the following commands :

cd /usr/lib
rm -f java
ln -s SunJava2-1.4 java


The listing "ls -ld java SunJava*" then shows:

lrwxrwxrwx 1 root root 12 Feb 8 01:47 SunJava2 -> SunJava2-1.4
lrwxrwxrwx 1 root root 14 Feb 7 23:51 SunJava2-1.3 -> SunJava2-1.3.1
lrwxrwxrwx 1 root root 14 Feb 7 23:51 SunJava2-1.4 -> SunJava2-1.4.2
drwxr-xr-x 3 root root 72 Feb 7 23:51 SunJava2-1.3.1
drwxr-xr-x 3 root root 72 Feb 7 23:51 SunJava2-1.4.2
lrwxrwxrwx 1 root root 12 Feb 8 01:47 java -> SunJava2-1.4

There is a configuration file somewhere within /etc/sysconfig (at least when running SuSE), enabling the administrator to set the "default VM" as configuration statement. The systenm will take that setting during bootup. I don't know if RH has such a setting and where it would reside.

Good luck.
 
Old 02-14-2004, 11:56 AM   #6
n_hendrick
Member
 
Registered: Jan 2004
Location: Canal Fulton OH.
Distribution: Ubuntu 15.04, Gentoo
Posts: 68

Original Poster
Rep: Reputation: 15
thanks for all your guys' help.
 
Old 02-14-2004, 02:00 PM   #7
stuzuk
LQ Newbie
 
Registered: Feb 2004
Distribution: Fedora
Posts: 17

Rep: Reputation: 0
I have installed java from a RPM I am using the Fedora Core and am very new to Linux.
I used the commands to see where the RPM is installed and the lcation is below.

/usr/java/jre1.3.1_10/

Java does not work and also has not come up in my plugins list in Mozilla 1.4.1

Please can someone assist me.

TIA
 
Old 02-14-2004, 07:25 PM   #8
stuzuk
LQ Newbie
 
Registered: Feb 2004
Distribution: Fedora
Posts: 17

Rep: Reputation: 0
I installed this as a "USER" and not as "ROOT" as at the time I did not know how to log in as root I know that sounds silly but I am a Windows person whom crossed over a week ago.

Im really enjoying Fedora but need some assitance

I tryed to reinstall Java as "ROOT" but when I double click the RPM it says that it has been installed allready.

How do I unistall it? so that I can reinsatll whilst logged in as "ROOT"
 
Old 02-15-2004, 10:17 AM   #9
stuzuk
LQ Newbie
 
Registered: Feb 2004
Distribution: Fedora
Posts: 17

Rep: Reputation: 0
All the information I needed was found here.

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

Last edited by stuzuk; 03-02-2004 at 01:41 PM.
 
Old 03-02-2004, 06:48 AM   #10
D4RK5UN
LQ Newbie
 
Registered: Feb 2004
Distribution: RH9
Posts: 5

Rep: Reputation: 0
Dern Java

..ok now I am unable to get Java j2re workin'(i use RH9)... I downloaded and installed an RPM from the Sun site but get still get the grey at the Java Console area, what is my problem ? Did I do, or not do something?
 
Old 03-02-2004, 06:52 AM   #11
D4RK5UN
LQ Newbie
 
Registered: Feb 2004
Distribution: RH9
Posts: 5

Rep: Reputation: 0
BTW... I followed the directions straight from the JAva during my install. And when attepting a re-install my box says to me "package j2re-1.4.2_03-fcs is already installed". Hmmm
 
Old 03-05-2004, 05:24 AM   #12
mkaman
Member
 
Registered: Oct 2003
Location: spain
Distribution: fc2, fc3
Posts: 54

Rep: Reputation: 16
I used the self-extracting package to install java in /usr/java/j2re<version> and then i added this to my path:
/usr/java/j2re<version>/bin
With this you can reach java, java_vm and jar from the comand line.

Then i created this file in the bin directory in the root of my user account:
---------------------------------------------------------------------------------
#!/bin/sh

export JAVA_HOME="/usr/java/j2re<version>"
export JAVA_PATH="$JAVA_HOME"
export PATH="$PATH:$JAVA_HOME/bin"
JDK_HOME="$JAVA_HOME"

-----------------------------------------------------------------------------------------
You can also put this file in the /bin directory to make this global.. You can easily change the version of java instaling a new one and modifing this file .

To get java into mozilla you only have to make a soft link (symbolic link) to the java plugin. Asuming you are in mozilla/plugins directory:

# ln -s /usr/java/j2re<version>/plugin/i386/ns610-gcc32/libjavaplugin_oji.so libjavaplugin_oji.so

I think this will work for j2re work (uninstall that rpms first and, of course, change <version> with your version :P)
 
Old 03-05-2004, 06:18 AM   #13
mkaman
Member
 
Registered: Oct 2003
Location: spain
Distribution: fc2, fc3
Posts: 54

Rep: Reputation: 16
Taking a look in the instaled j2re i have noticed that it comes with java web start (javaws). This helps you to load fastly java aplications from the web like these we can see in this demo site:
http://java.sun.com/products/javawebstart/demos.html

Asuming j2re is instaled in /usr/java/j2re1.4.2_02 and the folder /usr/java/j2re1.4.2_02/javaws exists:

create the file: /usr/java/j2re1.4.2_02/javaws/javaws.cfg
content:
----------------------------------------------------------------------
javaws.cfg.jre.0.path=/usr/java/j2re1.4.2_02/bin/java
javaws.cfg.jre.0.platform=1.4
javaws.cfg.jre.0.product=1.4.0
javaws.cfg.jre.default=0
-----------------------------------------------------------------------

Add this at the end of $HOME/.mime.types

application/x-java-jnlp-file jnlp

And add this at the end of $HOME/.mailcap

application/x-java-jnlp-file;/usr/java/j2re1.4.2_02/javaws/javaws %s

And go to the demo site to check that it works :P
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
j2re-1.4.2 paul62 Slackware 6 07-09-2005 06:06 PM
more than one instance of j2re audibel Linux - Software 3 04-05-2005 09:37 AM
How to install Azureus and j2re aleksausb Mandriva 1 06-02-2004 05:40 AM
J2re defcon8 Linux - Software 1 09-29-2003 05:07 PM
installing j2re senthilasks Linux - Software 2 08-21-2003 11:03 AM


All times are GMT -5. The time now is 06:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration