LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Java Install trouble (https://www.linuxquestions.org/questions/linux-software-2/java-install-trouble-304273/)

lmanwarren 03-21-2005 08:28 AM

Java Install trouble
 
Ok I installed fedora then tried installing java.I downloaded the jre-1_5_0_02-linux-i586-rpm.bin and ran it in a terminal.I agreed to the license and it inflated and gave me the rpm.I click the rpm and it goes through the install.Now if I go to applications and go to preferences there in the list is java and its the version I installed.If I go to /usr/lib/java there is the java folder in all its glory and I have no reason to believe its not installed.Now if i bring up a terminal and run java -version it comes back with a version that isn't even in my system instead of the one I downloaded.Now I was told I have to put java in my path so I edited /etc/profile.d and made it
export PATH=$PATH/usr/java/jre1.5.0_02/plugin/i386/ns7-gcc29
When I go to yahoo and try to play a game the applet doesn't load because I don't have java installed and I installed limewire but that won't even come up when I try to run it I assume because as far as its concerned java is no where to be found. I did the ln -s command and made the link in firefox for the java plugin.Now I am new so If I'm doing something wrong please tell me because I'm pulling out my hair

melinda_sayang 03-21-2005 08:44 AM

To install java plugin in firefox:
$ ln -s /bla/bla/bla/plugin/i386/ns7/* /bla/bla/bla/plugins/

This is wrong:
export PATH=$PATH/usr/java/jre1.5.0_02/plugin/i386/ns7-gcc29

This is right:
export PATH=$PATH:/usr/java/bin/

aaa 03-21-2005 08:50 AM

Do "export PATH=$PATH:/usr/java/jre1.5.0_02/bin"
The limewire should then work. For applets, make a symbolic link to /usr/java/jre1.5.0_02/plugin/i386/ns7-gcc29/libjavaplugin_oji.so (it may have a different name, but it's the only file in there). Also I use the plugin in the ns7 directory, not the n27-gcc29. If one doesn't work, try the other. Also if you have other problems make sure gcj is not interfering (there might be a /usr/bin/java link to it that interferes).

reddazz 03-21-2005 10:29 AM

You are also trying to use the wrong plugin, on Fedora, don't use the plugin meant for gcc 2.x, use the one in the ns7 subdirectory and not ns7-gcc29.

lmanwarren 03-21-2005 02:41 PM

Ok Lime wire is now up and running so one thing less to play with.I made the link in the firefox plugin folder but applets still fail to load.Say when trying to load a game in yahoo or pogo.This isn't big deal to me but is to the kids and when I get java straight going to get rid of XP.Now could there be something else I can check that I may have messed up preventing applets from loading.

reddazz 03-21-2005 03:24 PM

To setup java poperly with firefox, get rid of the current link in the firefox plugins directory, then do
Code:

#ln -s /opt/jdk1.5.0_01/jre/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/firefox-1.0.1/plugins/.
Change the firefox and java paths so that they the same as the ones on your system. When you have created the symlink, start firefox and type "about:plugins" in the address bar to check if java is installed properly.

lmanwarren 03-21-2005 07:39 PM

Well got it so applets load say for games.So I wiped system out and just loaded fedora.I installed java again and run java -version at terminal to be told bash: java: command not found.Also in /etc/profile.d there is no java to edit to add java to my path.So new install and new probs lol

reddazz 03-21-2005 07:57 PM

You need to add the java path yourself. Here is how I did mine,
Code:

#!/bin/sh
export JAVA_HOME=/opt/java
export MANPATH="$MANPATH:/opt/java/man"
export PATH="$PATH:/opt/java/bin:/opt/java/jre/bin"

Save is as java.sh in /etc/profile.d and make it executable. Also change the java path so that it matches the one on your system. Log out and in again and everyone using your machine will have java in their path.

mickyg 03-22-2005 07:10 AM

I'm a bit confused here chaps,

Surely the simplest way to get java 'working' so you can just type java in the shell is to create a symlink to the java executable in somewhere like /usr/local/bin?

I.e. ln -s /usr/java/jdk1.5.0/bin/java /usr/local/bin

That way you don't have to bother exporting paths and all that rubbish and everyone can use java on the machine? One line in the shell and your laughing!

reddazz 03-22-2005 04:26 PM

People use different methods to achieve the same thing. :)


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