Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: java -version bash: /usr/bin/java: No such file or directory ?

  1. #11
    Join Date
    Sep 2008
    Beans
    750
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: java -version bash: /usr/bin/java: No such file or directory ???

    ohhh! I think you are right. The jdk I used on the server was 32 bit. This computer 64 bit. That must be it. I am going to check and give status.
    20.04 LTS

  2. #12
    Join Date
    Sep 2008
    Beans
    750
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: java -version bash: /usr/bin/java: No such file or directory ???

    it doesnt work.

    ln -s /usr/lib/jvm/jdk1.7.0_17/bin/java -> /etc/alternatives/java
    bash: /etc/alternatives/java: No such file or directory

    cd /etc/alternatives

    java is there but in red color

    at /usr/lib/jvm Java is in red color, and the rest are in light blue... the other files in the same directory is green

    lrwxrwxrwx 1 root root 22 Oct 19 07:45 java -> /etc/alternatives/java
    lrwxrwxrwx 1 root root 23 Mar 6 14:03 javac -> /etc/alternatives/javac
    lrwxrwxrwx 1 root root 24 Oct 19 07:45 javaws -> /etc/alternatives/javaws
    lrwxrwxrwx 1 root root 23 Oct 19 07:45 jexec -> /etc/alternatives/jexec

    I dont know what red color means on the terminal
    ???
    Last edited by 007casper; March 9th, 2013 at 01:15 AM.
    20.04 LTS

  3. #13
    Join Date
    Sep 2008
    Beans
    750
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: java -version bash: /usr/bin/java: No such file or directory ???

    sudo update-alternatives --config java
    update-alternatives: warning: /etc/alternatives/java is dangling, it will be updated with best choice.
    There is only one alternative in link group java: /usr/lib/jvm/jdk1.7.0/bin/java
    Nothing to configure.
    20.04 LTS

  4. #14
    Join Date
    Sep 2008
    Beans
    750
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: java -version bash: /usr/bin/java: No such file or directory ???

    fix the situation. Now it works.

    It was the wrong version of jdk and the links werent updating.

    I update it to right jdk version 64 bit, and remove the links and relink it.

    java -version
    java version "1.7.0_17"
    Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
    Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)

    thank you all
    Last edited by 007casper; March 9th, 2013 at 02:04 AM.
    20.04 LTS

  5. #15
    Join Date
    Feb 2013
    Beans
    Hidden!

    Re: java -version bash: /usr/bin/java: No such file or directory ?

    Answering PM, as it may be of interest to others even if off-topic.
    Quote Originally Posted by 007casper
    Quote Originally Posted by schragge View Post
    FYI, default UID/GID=500 for the first created user are on RedHat-based systems, on Debian-based it's 1000.
    I am using ubuntu 12.04 not redhat on the server. I am just curious why it would set to 500.
    Hmm, interesting. On my system (Debian wheezy) both adduser and useradd use 1000 by default:
    Code:
    $ grep ^FIRST_.ID /etc/adduser.conf
    FIRST_UID=1000
    FIRST_GID=1000
    $ grep ^.ID_MIN /etc/{login.defs,default/useradd}
    /etc/login.defs:UID_MIN                  1000
    /etc/login.defs:GID_MIN                  1000
    These are the default values for regular user accounts if you don't specify UID/GID explicitly. Perhaps, you created a system account instead?
    Last edited by schragge; March 9th, 2013 at 07:13 PM.

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

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