Results 1 to 8 of 8

Thread: Where Is OpenJDK 7 Installation Directory?

Hybrid View

  1. #1
    Join Date
    Apr 2008
    Beans
    31

    Question Where Is OpenJDK 7 Installation Directory?

    Been trying to locate where OpenJDK 7 is installed to on Ubuntu 12.04 LTS but have ended up at a dead end. In the previous Ubuntu LTS version one could find out where a package was installed to via Synaptic, in the properties for the selected package.

    Does the Ubuntu Software Center have some functionality for finding out where a package has been installed to? Need the information in order to add OpenJDK 7 as a second Java platform for NB 7.1.

    I'm not sure if it is possible to change the default JDK used by NB once it has been set during installation.

  2. #2
    Join Date
    Oct 2011
    Location
    Chicago, IL
    Beans
    419
    Distro
    Xubuntu 10.04 Lucid Lynx

    Re: Where Is OpenJDK 7 Installation Directory?

    It's probably in /usr/bin

    If not, try opening a terminal and type
    Code:
    whereis java
    see if that helps.

  3. #3
    Join Date
    Apr 2008
    Beans
    31

    Re: Where Is OpenJDK 7 Installation Directory?

    Quote Originally Posted by 11jmb View Post
    It's probably in /usr/bin

    If not, try opening a terminal and type
    Code:
    whereis java
    see if that helps.

    Not much help I'm afraid. Normally the JDK is installed somewhere in /usr/lib if I recall correctly. NB doesn't recognise the JDK in /usr/share/java when adding a new Java platform.

  4. #4
    Join Date
    Oct 2011
    Location
    Chicago, IL
    Beans
    419
    Distro
    Xubuntu 10.04 Lucid Lynx

    Re: Where Is OpenJDK 7 Installation Directory?

    Hmm I won't be much help with netbeans, but I'm pretty sure Ubuntu Software Center will install all of your software in its proper /usr location. you could try a "grep -r -l java /usr" and seeing what comes up. For some weird reason, it may have been installed in /usr/local, as well.

    Also, what is your output from "whereis java"?

  5. #5
    Join Date
    Apr 2008
    Beans
    31

    Re: Where Is OpenJDK 7 Installation Directory?

    Quote Originally Posted by 11jmb View Post
    Hmm I won't be much help with netbeans, but I'm pretty sure Ubuntu Software Center will install all of your software in its proper /usr location. you could try a "grep -r -l java /usr" and seeing what comes up. For some weird reason, it may have been installed in /usr/local, as well.

    Also, what is your output from "whereis java"?
    Here is the output from the whereis command:

    java: /usr/bin/java /usr/bin/X11/java /usr/share/java /opt/jdk1.7.0/bin/java /usr/share/man/man1/java.1.gz


    The directory /opt/jdk1.7.0 I know about since I installed the Oracle JDK to that location.

  6. #6
    Join Date
    May 2007
    Location
    Leeds, UK
    Beans
    1,675
    Distro
    Ubuntu

    Re: Where Is OpenJDK 7 Installation Directory?

    On my 64-bit system it is /usr/lib/jvm/java-7-openjdk-amd64.

    To find your JDK directory reliably you need to follow the links to your javac executable through the alternatives system until you stop hitting symbolic links

    Code:
    $ which javac
    /usr/bin/javac
    $ ls -l /usr/bin/javac
    lrwxrwxrwx 1 root root 23 May  2 10:02 /usr/bin/javac -> /etc/alternatives/javac
    $ ls -l /etc/alternatives/javac
    lrwxrwxrwx 1 root root 43 May  2 10:02 /etc/alternatives/javac -> /usr/lib/jvm/java-7-openjdk-amd64/bin/javac
    $ ls -l /usr/lib/jvm/java-7-openjdk-amd64/bin/javac
    -rwxr-xr-x 1 root root 6352 Apr 13 04:00 /usr/lib/jvm/java-7-openjdk-amd64/bin/javac
    The location of the JDK for Netbeans, Eclipse, etc. is the directory above the 'bin' directory that contains javac. Hence '/usr/lib/jvm/java-7-openjdk-amd64'.

Tags for this Thread

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
  •