Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Enabling Java

  1. #1

    Enabling Java

    I have installed 7.3 and downloaded the j2re rpm.bin (for Linux)file from sun.

    I take it that this must be installed before i will get full Java functionality.

    What else if anything should i be installing/configuring to enjoy java on my box? I would like to be able to start developing my own apps eventually..

    Apologies if this has been discussed before..

    Also, for those of you ruuning oss on RH7.3 you'll have to download the kernel-source and recompile the oss drivers.


    Bogler 8)

  2. #2

    Re:Enabling Java

    You have to extract the rpm from the .bin file first.

    chmod a+x j2sdk-1_4_0-linux-i386-rpm.bin

    The just install the rpm:

    rpm -Uvh j2sdk-1_4_0-fcs-linux-i386.rpm

    I put this in another thread on the board, but I changed the way I was doing it. The so you don't have to use the full path to java:

    Create the file /etc/profile.d/
    Copy this to into the file:

    #Begin /etc/profile.d/
    #Set JAVA_HOME and path


    if ! echo $PATH | /bin/grep -q "$JAVA_HOME/bin" ; then

    export JAVA_HOME

    #End /etc/profile.d/

    If you install Java in a different place just change JAVA_HOME. Make sure the has the right permissions.

    chown root.root /etc/profile.d/
    chmod 0755 /etc/profile.d/

    For the changes to take effect, logout and login or you can use: source /etc/profile

    If you did it right:

    $ echo $PATH

    $ env | grep JAVA_HOME

    You can just add the same to ~/.bash_profile I prefer to use /etc/profile.d because you only have to add it once and it is setup for all users.

    Jim H

  3. #3

    Re:Enabling Java

    Thanks JimH

    I managed to get som instructions on the sun site but you help is invaluable as ever.



  4. #4

    Re:Enabling Java

    What's the difference between the

    jdk and j2re packages?

    I take it one is the development libraries and the other is the runtime.

    Should i have both of these installed for best performance/usability?



  5. #5

    Re:Enabling Java

    The jdk is required if you are going to be writing java programs. The jdk includes the jre.

    If you just want to run java programs and applets then you only need the jre. The jre is quite a bit smaller download then the jdk so if you won't be writing java programs just download the jre.

    Jim H

  6. #6

    Re:Enabling Java

    I tried the above script but i couldn't get it to work.
    It keeps saying
    bash: command not found

    When i delete the file this error dissapears. If i have the suggested file in place it doesn't add the java entry to the PATH variable.

    I cut and paste the script and have been through it line by line. Can't see what's wrong with it.

    Thanks for any help


  7. #7

    Re:Enabling Java

    Hmmm, you are doing something wrong. Try copying it by hand instead of copying and pasting it. You might be picking up an "invisible" character that is messing everything up.

    Don't use the same file to edit it by hand. Delete the one you have and start again.

  8. #8

    Re:Enabling Java

    I think i have it now 8)

    Thanks again


  9. #9

    Re:Enabling Java

    Quote Originally Posted by Bogler
    I think i have it now 8)
    What was the problem?

    Jim H

  10. #10

    Re:Enabling Java

    I reckon it must have been an invisible char.

    BTW can you use profile.d for other scripts i.e. to add to your PATH so that all your apps are accesssible from the cli at runtime. I would like the path to contain /usr/local/psionic for portsentry etc etc.

    Does the profile.d directory contain scripts that are run at boot and therefore has lots of mileage for manipulation..


Similar Threads

  1. Enabling php for directory in Apache
    By honey bee in forum Linux - General Topics
    Replies: 3
    Last Post: 09-27-2007, 01:30 PM
  2. Enabling CMOS/BIOS setup
    By Millermagic in forum Windows - General Topics
    Replies: 4
    Last Post: 02-06-2005, 09:58 PM
  3. java and opera... always says invalid java directory
    By sujoki in forum Linux - Software, Applications & Programming
    Replies: 0
    Last Post: 08-26-2003, 03:54 PM
  4. Enabling DMA for dvd
    By in forum Linux - General Topics
    Replies: 2
    Last Post: 09-02-2002, 02:17 AM
  5. Is enabling quotas different on Ext3 than Ext2?
    By tolstoy in forum Linux - General Topics
    Replies: 1
    Last Post: 03-19-2002, 03:29 PM


Posting Permissions

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