Find the answer to your Linux question:
Results 1 to 9 of 9
I'm having trouble getting Mandrake Linux 9.0 to recognize my Java Install - "j2re-1_4_1_01-linux-i586.bin" installation. I installed to the "/usr/java" directory, but the system won't recognize the install. Am I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2003
    Location
    Kalamazoo, MI USA
    Posts
    2

    Trouble recognizing Java install


    I'm having trouble getting Mandrake Linux 9.0 to recognize my Java Install - "j2re-1_4_1_01-linux-i586.bin" installation. I installed to the "/usr/java" directory, but the system won't recognize the install. Am I maybe in the wrong directory? The install instructions did not specify a certain directory but used the above as an example. What do you think?

    Also, is Java VM the same as j2re?

    Am I missing somthing?

    Please help!!

  2. #2
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    J2RE is the Java Runtime Environment (Version 2), and, yes, it includes the JVM.
    Anyway, in what way is your system unable to recognize the installation? If the problem is with mozilla, you should download Mozilla's java library (which basically just hooks up Mozilla with the J2RE). It's available from http://www.mozilla.org/

  3. #3
    Linux Engineer
    Join Date
    Dec 2002
    Location
    New Zealand
    Posts
    766
    im havign a similar problem, anything that uses the "java" command runs the factory java thing, not j2re. Which meant i have to change any scripts i want to use from "java" to "/usr/java/...... etc etc", which is a real pain in the ass.

    im thinking there is a path defined somewhere on the comp that tells it where the java executables are, anyone know where this is??

  4. #4
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    You know, all programs can be launched by only its file name only when the directory in which they reside is in the PATH env var. The default value of PATH is /usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin. Sun's J2RE binaries install to /usr/java/j2re*/bin. I don't know why they have done it that way, but they have, so you basically have two options: Add the J2RE bin directory to your PATH (before /usr/bin, so that the "java" that's there won't be found first), or you can make a symlink farm in /usr/local/bin or so to the binaries from J2RE.

  5. #5
    Linux Engineer
    Join Date
    Dec 2002
    Location
    New Zealand
    Posts
    766
    yeah i thought of the symlink idea about 10 mins after i posted that, but i cant remember the command

    and i keep hearing about how i have to add stuff to PATH but i never did work out exactly where this magic path variable is. Someone wanna tell me?

  6. #6
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    The link command is ln. Use -s to create symlinks instead of hard links.

    The PATH variable is an environment variable. For those of you who don't know what environment variables are, I will explain it in short:
    When a process is created (such as when you log in on your system and /bin/sh is executed), the process which created it can pass it environment variables. Usually it passes the same environment variables as it has itself. An environment variable has a name and a value. The name is usually in uppercase (In this case PATH). Environment variables are mainly used for passing different kinds of information to processes, for example what the home directory of the user that runs the process is. That's passed in the HOME variable. Another common variable is the PATH variable, which specifies which directories to look for programs to execute in when no path is given for the program. The different directories are seperated by colons, and the list is checked in left-to-right order. For example, if your PATH is /usr/local/bin:/bin:/usr/bin, and you run "ls", the shell first looks in /usr/local/bin for an executable file named ls, and then when it doesn't find one, it looks in /bin, where it finds it and executes it. Some other common variables are PRINTER, which specifies to the lpr command what your default printer name is, and TERM, which specifies what kind of terminal you're currently using.
    To create or change an environment variable you type this in the shell:
    name=value
    There must be no space between name and =, or the shell will interpret the line as a command. If you create a new one you must also run "export name". This is because the shell by default doesn't create the variable as an environment variable, but only as an internal shell variable, which in turn means that the variable will not be exported to processes started by the shell.
    A good place to look in to change your default PATH is the .bash_profile file in your home directory. That file is sourced everytime bash is started.

  7. #7
    Linux Enthusiast
    Join Date
    Jun 2002
    Location
    San Antonio
    Posts
    621
    the system-wide default PATH is probably sourced somewhere in /etc/profile or (less likely) /etc/bashrc
    I respectfully decline the invitation to join your delusion.

  8. #8
    Just Joined!
    Join Date
    Feb 2003
    Location
    Kalamazoo, MI USA
    Posts
    2
    Once j2re is extracted and installed...do we just to manually install the java plugins in each browser for java to work? Or do we really have to go though and do all that stuff you said?

    I get what your saying about the changing the paths...What I dont understand is why it's installer would not put it into the proper directory that didnt need to be modified by me!

    Is there an easy answer to this? Im a great big newbie! :o

  9. #9
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    I don't know why sun has done it like this. It's as big an enigma for me as it is for you.
    Anyway, if you're using mozilla, just go to http://www.mozilla.org/ and download the plugin there, and it will fix you up.

Posting Permissions

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