LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   step by step installation of java (https://www.linuxquestions.org/questions/linux-software-2/step-by-step-installation-of-java-123320/)

zexter 12-06-2003 03:10 PM

step by step installation of java
 
i tried to install java and i just get lost, the read me tells me nothing, can someone please tell me the step by step procedure of installing java the easiest way?

-THANKS

green-ears 12-06-2003 08:13 PM

hi there zexter i hope the howto can break the ice for you with installing java. if the rpm do not install in the mozilla. you can find out if it as by looking in plugins. on the top bar of the brower. if it not seen in the plugins you will need to do a sybolic link for the java. so i have do it my self but i do not have the skill to explane howto myself. so have a read around soft links or sybolic links which the same thing. so all the best

green-ears


Installing Java

Java is a programming environment used by many applications, especially on the Word Wide Web. This section deals with getting Java installed and setup to be used with the browsers Konqueror, Galeon and Mozilla.

Step 1

See if you have Java installed.
$ rpm -q j2re

The -q option tells rpm to check if a package is installed. I know it is more intuitive to search for "java," but that isn't what the package is called. You need to search for j2re, which stands for the Java 2 Runtime Environment.

If it is installed, you should get back something like:
j2re-1.4.0_01-fcs

If it isn't, you'll see:
package j2re is not installed

If j2re is installed on your system, then jump to step 5. Otherwise, go to step 2.

Step 2

If you do not have j2re installed, you need to download it from http://java.sun.com/j2se. Download the JRE Linux Red Hat shell script to your home directory.

The download is rather large (20.3 MB) and Sun does not sign this file with a private key, nor did I find a checksum to verify the integrity of the downloaded.

They do provide the following in their download instructions:
1. Check the download file size
Before you download a file, notice that its byte size is provided on the download page. Once the download has completed, check that you have downloaded the full, uncorrupted software file.

This is better than nothing, but weak compared to signing the program with a private key or providing a md5sum. As you will note from the download page, the file size should be 21,300,192 KB. Either issue the ls -la command or in a file manager, right-click on the file and choose Properties to verify the file size.

Step 3

Once the software has downloaded, run the install script by starting a terminal, going to the directory that contains the file you downloaded (should be your home directory) and issuing the following command:

$ ./j2re-*-linux-i586-rpm.bin

Make sure you have a period and a forward slash in front of the file name (unless you are using the complete path). This tells the system to run the program in the current directory. Also, if you get an error bad interpreter: permission denied when running the bin file, try first issuing as root:
# chmod +x j2re-*-linux-i586-rpm.bin

Now, keep hitting the space bar until you are at the end of the license and you see the following:
Do you agree to the above license terms? [yes or no]

If you do, type yes and hit <ENTER>

This will create an RPM file named j2re-<version number>-fcs-linux-i386.rpm.

You will notice that the original bin file is still there which you can move it to the trash by issuing the move command:
$ mv ~/j2re-*-linux-i586-rpm.bin ~/Desktop/Trash/

Step 4

Now we need to install the RPM file:
# rpm -ivh j2re-*-fcs-linux-i386.rpm

or

# rpm -Uvh j2re-*-fcs-linux-i386.rpm
if you are upgrading

Check to see that j2re installed correctly (see step 1).

Step 5

Now that the j2re package is installed, it is time to setup the browsers.

Konqueror

Settings --> Configure Konqueror
Konqueror Browser
Java tab

check Enable Java globally and
Path to java executable, or 'java' should be set to:
/usr/java/j2re<version number>/bin/java


Mozilla and Galeon

For Mozilla and Galeon, you'll need to create a symbolic link in your Mozilla plug-in directory to the plug-in file.

You can do this by issuing the following command as root:

# ln -s /usr/java/j2re<version number>/plugin/i386/ns610/libjavaplugin_oji.so /usr/lib/mozilla/plugins/libjavaplugin_oji.so

Note: Your Mozilla directory may be different than the one in the command above. In RH 8, it is /usr/lib/mozilla-1.0.1/plugins/libjavaplugin_oji.so, so check that out before issuing the command.

Now start up Mozilla or Galeon, and type in about:plugins
You should see Java listed there.


Step 6

Now you can move the j2re RPM to the Trash with:
$ mv ~/j2re-*-fcs-linux-i386.rpm ~/Desktop/Trash/


relevant help files:

man rpm
man ls
man ln

---------------------------------------------------------------------------------
If this page has helped you, please take a second and rate it @:
http://svcs.affero.net/rm.php?r=dw

Lespuff 12-06-2003 11:23 PM

I have this RPMs installed in my system and I was having problem with java also...jre-1.3.1_09-fcs
and jdk-1.3.1_09-fcs are the 2 packages I have...would this be the same as your "j2re"....thanks...

Lespuff 12-07-2003 12:01 AM

Ok Heres' whats going on with me...I have the Jre-.1.3.1_09-fcs and the JDK-1.3.1_09-fcs...I'm not a developer and I just want to be able to use java on mozilla...so I went /usr/java/jre1.3.1_09/plugin/i386/ns600/libjavaplugin_oji.so and made sym link to my mozilla plugin directory @ /usr/lib/mozilla-1.0.1/plugins/.....I fired up mozilla nothing happens and I check the about plugins in the help pull down on the browser and it doesn't show that I have java installed....So I decide to hard copy the libjavaplugin_oji.so to my mozilla plugin dir...then the java plugins show up in my browser under the about-plugin help menu....but, when I choose to see a java site...the browser closes automatically....does anybody have these problems too...

Lespuff 12-07-2003 01:15 AM

Ok just wanted to say I got it going...it wasn't that bad....just had the wrong java...i should be downloading this one http://java.sun.com/j2se/1.4.2/download.html....thanks anyways


All times are GMT -5. The time now is 01:27 AM.