Note - this should be made a sticky, since so many people don't understand how to do this.
It's so easy to get Java going for Linux. You should, of course, have the most uptodate browser, which in this case is Firefox-1.0.6. These instructions were tested using Firefox and Fedora Core 2, 3, and 4. Really. Read through them first, and make sure you understand what each command is doing, and why. Then proceed. These instructions work: I have used them while writing this to upgrade from Java 1.5.0-02 to 1.5.0-04 - I copied the commands directly from the text editor into the terminal. It's foolproof, seriously. If you see a line that starts with a '%', that's a command that you should type in. Don't type in the percent sign, though - that's just a convenient shorthand for the terminal prompt.
1. Go to
http://www.java.com/en/download/manual.jsp, and click on the download button for the very last choice, which is "Linux (self-extracting file)".
2. Your browser will ask you what you want to do with the file called jre-1_5_0_04-linux-i586.bin. Of course you want to save it on your hard drive somewhere - in the example, we'll be saving it in your home directory. Unless you don't have an Intel-based x86 processor - then you need to find another tutorial. If your processor is a i386, and not a i586, don't worry - it won't make a bit of difference - the proof can be seen in step #15 below. Close your browser after the download finishes.
3. Pop open a terminal, and go superuser (when prompted, give your root password):
% su
Password: *********
4. Make a directory called /usr/java:
% mkdir /usr/java
5. Enter that directory:
% cd /usr/java
6. Copy the file you saved into that directory:
% cp ~/jre-1_5_0_04-linux-i586.bin .
('~' means home, '.' means "copy to right here")
7. List the directory contents to verify the move:
% ls
8. Change the permissions of the script:
% chmod +x jre-1_5_0_04-linux-i586.bin
10. Run the self-extractor:
% ./jre-1_5_0_04-linux-i586.bin
('./' means "run it from right here")
9. List the directory, to verify the correct permissions:
% ls -l
10. Run the self-extractor:
% ./jre-1_5_0_04-linux-i586.bin
('./' means "run it from right here")
11. Read the license agreement, and press the spacebar if you see "More" at the bottom of the screen.
12. After the license agreement is done, it will ask you if you agree. To agree, type 'yes' and press enter. Watch as all the work is done for you.
13. Move to the Firefox plugins directory:
% cd /usr/lib/firefox-1.0.6/plugins
14. List the files there, just so you know:
% ls
15. Create a symbolic link to the Java plugin:
% ln -s /usr/java/jre1.5.0_4/plugin/i386/ns7/libjavaplugin_oji.so ./libjavaplugin_oji.so
16. List to verify:
% ls
17. Move to your .firefox plugins directory:
% cd /home/username/.firefox/plugins
(of course you have to substitute your own username...)
18. Make another symbolic link, using the exact same command as before:
% ln -s /usr/java/jre1.5.0_4/plugin/i386/ns7/libjavaplugin_oji.so ./libjavaplugin_oji.s
19. Exit from superuser mode:
% exit
All done. Enjoy Java on the web. For more info on the commands here, consult the manual pages. Example - 'man mkdir'. Or, if you're lazy, do a Google search for 'man mkdir' - many people have published manual pages to the web.