Find the answer to your Linux question:
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 24
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Jul 2005
    Location
    classified
    Posts
    246

    Installing the Java Plugin - a definitive guide


    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.

  2. #2
    Linux Newbie
    Join Date
    Jul 2005
    Location
    classified
    Posts
    246
    bumped, since it is still apparently an issue

  3. #3
    Banned
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    1,120
    Nice and universal howto
    Should really be added in "Linux Tutorials" section.

  4. #4
    Linux Newbie usblackhawk's Avatar
    Join Date
    Apr 2005
    Location
    London, UK
    Posts
    241

    Re: Installing the Java Plugin - a definitive guide

    Quote Originally Posted by worker201
    [i]


    4. Make a directory called /usr/java:
    % mkdir /usr/java
    every time i try to do that i get :

    Code:
    [root@localhost simplyskillz]# mkdir/usr/java
    bash: mkdir/usr/java: No such file or directory
    what do i do?

  5. #5
    Linux Newbie
    Join Date
    Jul 2005
    Location
    classified
    Posts
    246
    put a space in there:

    mkdir_ _/usr/java
    not
    mkdir/usr/java

  6. #6
    Linux Newbie usblackhawk's Avatar
    Join Date
    Apr 2005
    Location
    London, UK
    Posts
    241
    ok thankyou

  7. #7
    Linux Newbie usblackhawk's Avatar
    Join Date
    Apr 2005
    Location
    London, UK
    Posts
    241

    Re: Installing the Java Plugin - a definitive guide

    Quote Originally Posted by worker201
    Note - this should be made a sticky, since so many people don't understand how to do this.

    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")
    i get
    Code:
    [root@localhost java]# cp ~/jre-1_5_0_04-linux-i586.bin
    cp: missing destination file
    Try `cp --help' for more information.
    [root@localhost java]#
    what do i do?

  8. #8
    Linux Newbie
    Join Date
    Jul 2005
    Location
    classified
    Posts
    246
    You missed the period at the end of the command.

    % cp ~/jre-1_5_0_04-linux-i586.bin .

    In Linux, . means "here, in this directory". So you are copying the file to the directory you are in when you run the copy command. If that's not the directory you want to copy to, then add a destination:

    % cp /usr/bin/thisthing /usr/share/thatthing

    Also, .. means "the directory above this one". The following command will put you in /usr/local:

    % cd /usr/local/bin
    % cd ..

    Mind your "punctuation".

  9. #9
    Linux Newbie usblackhawk's Avatar
    Join Date
    Apr 2005
    Location
    London, UK
    Posts
    241
    now i get this:

    Code:
    [root@localhost simplyskillz]# cd /usr/java
    [root@localhost java]# cp ~/jre-1_5_0_04-linux-i586.bin .
    cp: cannot stat `/root/jre-1_5_0_04-linux-i586.bin': No such file or directory
    [root@localhost java]#
    i dont understand it?

  10. #10
    Linux Newbie
    Join Date
    Jul 2005
    Location
    classified
    Posts
    246
    Try giving it the absolute path, instead of the ~ path. So wherever you saved the file. On my computer, it would be:

    cp /home/lholcombe/jre-1_5_0_04-linux-i586.bin .

    Since you are root, it is trying to copy from root's home. And you didn't save the file in root's home, did you?

Page 1 of 3 1 2 3 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •