bash:javac: command not found


Results 1 to 9 of 9

Thread: bash:javac: command not found

  1. #1
    Join Date
    Sep 1999
    Location
    Santa Cruz, CA, USA
    Posts
    1,212

    bash:javac: command not found

    Been trying to figure this one out! I know to add it to my path... but I can't even find the javac command on my OpenSuSE 10.2 system! And I have all the Java tools (Eclipse, Postgresql Java, Java 1.5.0...) installed but I can't seem to find the javac command so I can add it too my path!?

    Any ideas? I am stumped big time.
    One by one the penguins steal my sanity...

    Vanpooling now...

  2. #2
    Join Date
    Dec 2003
    Location
    Phoenix, AZ
    Posts
    647
    Quote Originally Posted by MkIII_Supra
    Been trying to figure this one out! I know to add it to my path... but I can't even find the javac command on my OpenSuSE 10.2 system! And I have all the Java tools (Eclipse, Postgresql Java, Java 1.5.0...) installed but I can't seem to find the javac command so I can add it too my path!?

    Any ideas? I am stumped big time.
    have you tried doing slocate or locate?

    updatedb && locate javac

    or

    slocate -u && slocate javac
    "There's a big difference between "copy" and "use". It's exatcly the same
    issue whether it's music or code. You can't re-distribute other peoples
    music (becuase it's _their_ copyright), but they shouldn't put limits on
    how you personally _use_ it (because it's _your_ life)."

    --Linus Torvalds

  3. #3
    Join Date
    Sep 1999
    Location
    Santa Cruz, CA, USA
    Posts
    1,212
    No, because they never seem to work for me. I used the find files and folders search option provided by KDE. I will try the CLI options tomorrow when I get to the office.
    One by one the penguins steal my sanity...

    Vanpooling now...

  4. #4
    Join Date
    Sep 1999
    Location
    Santa Cruz, CA, USA
    Posts
    1,212
    Like I said they never seem to work for me!

    Master: updatedb && locate javac
    bash: updatedb: command not found

    Master: slocate -u && slocate javac
    bash: slocate: command not found

    Next idea?
    One by one the penguins steal my sanity...

    Vanpooling now...

  5. #5
    Join Date
    Apr 2001
    Location
    SF Bay Area, CA
    Posts
    14,936
    find /usr -name javac

    This assumes that Java is installed somewhere under /usr, which should be true. This doesn't require any database to be updated or anything like that, it just searches the real live FS for you.

    You shouldn't have to be root, but if you get any "permission denied" errors and don't find javac, you might want to retry it as root, just to be sure.

    If you still can't find javac, try:

    find / -xdev -name javac

    instead. The -xdev will prevent it from trying to search /proc, /sys, and any filesystem other than your root FS (so if you have any other disk-based FSes mounted, add their mount point after the "/" argument so they get searched).

  6. #6
    Join Date
    Apr 2003
    Location
    London.on.ca
    Posts
    63
    On my Etch system using the Sun bin, I installed to /usr/lib following this guide.

    I imagine yours in in the same basic spot.

    Then update-alternatives to configure a symlink from /usr/bin/javac to the /usr/lib/jvm/jdk1.6.0_02/bin/javac

    Steps that I've used the last few times... http://www.centricware.org/wiki/2007/01/28/21.58

  7. #7
    Join Date
    Apr 2003
    Location
    Oklahoma
    Posts
    559
    As bwkaz mentioned, I would guess you are getting those errors because updatedb is in /sbin, and you are trying to run it as a regular user.

    Regardless, openSuse puts the javac you are looking for in /usr/lib/jvm/java-version#-sun/bin, and symlinks to it from /usr/bin.

    Check to see if you have a package installed along the lines of java-1_5_0-sun-devel-1.5.0_update12-3.1. If you don't have one that says "...-sun-devel-...", then you probably don't have it. (you might just have the jre).

    BTW, if you install the java sdk and eclipse from openSuse's rpms, you shouldn't need to add its location to your classpath; or at least I didn't need to.

  8. #8
    Join Date
    Jan 2003
    Posts
    1,012
    Just a quick point out. updatedb is provided by the findutils.
    You can tuna piano, but you can't tune a fish.

    http://www.lunar-linux.org/
    It's worth the spin.

    http://www.pclinuxos.com/page.php?7
    Puts the rest to shame.

  9. #9
    Join Date
    Sep 1999
    Location
    Santa Cruz, CA, USA
    Posts
    1,212
    Boy I feel like a dumb@$$... I didn't install the Java SDK. Realized it this morning when I was looking into another issue with PostgreSQL. So this is resolved.
    One by one the penguins steal my sanity...

    Vanpooling now...

Posting Permissions

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