Find the answer to your Linux question:
Results 1 to 10 of 10
Hi I recently shifted to mdk from FC4. I tried to install the java development kit on my box but it does not work. It gets installed but when I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Enthusiast apoorv_khurasia's Avatar
    Join Date
    Feb 2005
    Posts
    624

    jdk on mdk 10.1


    Hi
    I recently shifted to mdk from FC4. I tried to install the java development kit on my box but it does not work. It gets installed but when I run the following commands
    Code:
    java
    or
    Code:
    javac
    I just get the message of unrecognized command. It used to work on MDK 10.0 and FC 2,3,4. but not here. ANY HELP??????
    Thanks in advance.
    "There is no sixth rule"
    --Rob Pike
    Registered Linux User: 400426 home page

  2. #2
    Linux User eugrus's Avatar
    Join Date
    Dec 2004
    Location
    Russia
    Posts
    391
    Your java and javac binaries are now in /usr/java/j2sdk*/bin folder
    You could link them to /usr/bin if you like

  3. #3
    Linux Guru AlexK's Avatar
    Join Date
    Feb 2005
    Location
    Earth
    Posts
    3,379
    or you could update your path variable with:

    Code:
    export PATH=$PATH:/usr/java/jdk1.5.0_04/bin/
    Life is complex, it has a real part and an imaginary part.

  4. #4
    Linux Enthusiast apoorv_khurasia's Avatar
    Join Date
    Feb 2005
    Posts
    624
    Quote Originally Posted by AlexK
    or you could update your path variable with:

    Code:
    export PATH=$PATH:/usr/java/jdk1.5.0_04/bin/
    Thanks a lot!!!!!!! It finally worked.....
    Cool signature too!!!
    "There is no sixth rule"
    --Rob Pike
    Registered Linux User: 400426 home page

  5. #5
    Linux Enthusiast apoorv_khurasia's Avatar
    Join Date
    Feb 2005
    Posts
    624
    Quote Originally Posted by AlexK
    or you could update your path variable with:

    Code:
    export PATH=$PATH:/usr/java/jdk1.5.0_04/bin/
    Thanks that worked but whenever I restart my console (leave alone the computer) I have to retype this command.
    "There is no sixth rule"
    --Rob Pike
    Registered Linux User: 400426 home page

  6. #6
    Linux User eugrus's Avatar
    Join Date
    Dec 2004
    Location
    Russia
    Posts
    391
    Thanks that worked but whenever I restart my console (leave alone the computer) I have to retype this command.

    Find
    Code:
    pathmunge /sbin
    pathmunge /usr/sbin
    pathmunge /usr/local/sbin
    in your /etc/profile and add
    Code:
    pathmunge /usr/java/jdk1.5.0_04/bin/
    after them

  7. #7
    Linux Enthusiast apoorv_khurasia's Avatar
    Join Date
    Feb 2005
    Posts
    624
    Quote Originally Posted by eugrus
    Thanks that worked but whenever I restart my console (leave alone the computer) I have to retype this command.

    Find
    Code:
    pathmunge /sbin
    pathmunge /usr/sbin
    pathmunge /usr/local/sbin
    in your /etc/profile and add
    Code:
    pathmunge /usr/java/jdk1.5.0_04/bin/
    after them
    Could not find such things in /etc/profile. Pasting the whole file here....
    Code:
    # /etc/profile -*- Mode: shell-script -*- 
    # &#40;c&#41; MandrakeSoft, Chmouel Boudjnah <chmouel@mandrakesoft.com>
    
    loginsh=1
    
    # Users generally won't see annoyng core files
    &#91; "$UID" = "0" &#93; && ulimit -S -c 1000000 > /dev/null 2>&1
    
    if ! echo $&#123;PATH&#125; |grep -q /usr/X11R6/bin ; then
        PATH="$PATH&#58;/usr/X11R6/bin"
    fi
    
    if &#91; "$UID" -ge 500 &#93; && ! echo $&#123;PATH&#125; |grep -q /usr/games ; then
        export PATH=$PATH&#58;/usr/games
    fi
    
    umask 022
    
    USER=`id -un`
    LOGNAME=$USER
    MAIL="/var/spool/mail/$USER"
    HISTCONTROL=ignoredups
    HOSTNAME=`/bin/hostname`
    HISTSIZE=1000
    
    if &#91; -z "$INPUTRC" -a ! -f "$HOME/.inputrc" &#93;; then
        INPUTRC=/etc/inputrc
    fi
    
    # some old programs still use it &#40;eg&#58; "man"&#41;, and it is also
    # required for level1 compliance for LI18NUX2000
    NLSPATH=/usr/share/locale/%l/%N
    
    export PATH PS1 USER LOGNAME MAIL HOSTNAME INPUTRC NLSPATH
    export HISTCONTROL HISTSIZE 
    for i in /etc/profile.d/*.sh ; do
    	if &#91; -x $i &#93;; then
    		. $i
    	fi
    done
    
    unset i
    "There is no sixth rule"
    --Rob Pike
    Registered Linux User: 400426 home page

  8. #8
    Linux Guru bryansmith's Avatar
    Join Date
    Nov 2004
    Location
    /Ontario/Canada
    Posts
    2,619
    Quote Originally Posted by eugrus
    Your java and javac binaries are now in /usr/java/j2sdk*/bin folder
    You could link them to /usr/bin if you like
    This seems like the simplest solution...have you tried this?
    Code:
    ln -s /usr/java/j2sdk*/bin/java /usr/bin/java
    ln -s /usr/java/j2sdk*/bin/javac /usr/bin/javac
    (Replace * with your version)
    Bryan
    Looking for a distro? Look here.
    "There can be no doubt that all our knowledge begins with experience." - Immanuel Kant (Critique of Pure Reason)
    Queen's University - Arts and Science 2008 (Sociology)
    Registered Linux User #386147.

  9. #9
    Linux Enthusiast apoorv_khurasia's Avatar
    Join Date
    Feb 2005
    Posts
    624
    Quote Originally Posted by bryansmith
    Quote Originally Posted by eugrus
    Your java and javac binaries are now in /usr/java/j2sdk*/bin folder
    You could link them to /usr/bin if you like
    This seems like the simplest solution...have you tried this?
    Code:
    ln -s /usr/java/j2sdk*/bin/java /usr/bin/java
    ln -s /usr/java/j2sdk*/bin/javac /usr/bin/javac
    (Replace * with your version)
    Bryan
    Yo! It finally works!!! Thanks a lot!!!
    "There is no sixth rule"
    --Rob Pike
    Registered Linux User: 400426 home page

  10. #10
    Linux User eugrus's Avatar
    Join Date
    Dec 2004
    Location
    Russia
    Posts
    391
    Quote Originally Posted by apoorv_khurasia
    Quote Originally Posted by bryansmith
    Quote Originally Posted by eugrus
    Your java and javac binaries are now in /usr/java/j2sdk*/bin folder
    You could link them to /usr/bin if you like
    This seems like the simplest solution...have you tried this?
    Code:
    ln -s /usr/java/j2sdk*/bin/java /usr/bin/java
    ln -s /usr/java/j2sdk*/bin/javac /usr/bin/javac
    (Replace * with your version)
    Bryan
    Yo! It finally works!!! Thanks a lot!!!
    I've suggested it in the early begining!

Posting Permissions

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