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

Thread: [SOLVED] need help in installing java jdk

  1. #1
    Join Date
    Jun 2008
    Location
    imjscn
    Beans
    130

    [SOLVED] need help in installing java jdk

    I installed sun-java6 jdk and ant from the Synaptic. the result is ant is not working properly:

    Code:
    ant -version
    Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-6-openjdk/lib/tools.jar
    Is that because I installed a wrong jdk?

    I tried to search out where is the tools.jar, I got this:
    Code:
    locate tools.jar
    /usr/lib/jvm/java-6-sun-1.6.0.06/lib/tools.jar
    Is the the same tools.jar that required by ant? If it is how can I point ant to this file?
    Last edited by imjscn; July 26th, 2008 at 08:05 AM.

  2. #2
    Join Date
    Mar 2008
    Location
    City of Pines
    Beans
    3,585

    Re: need help in installing java jdk

    Quote Originally Posted by imjscn View Post
    I installed sun-java6 jdk and ant from the Synaptic. the result is ant is not working properly:

    Code:
    ant -version
    Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-6-openjdk/lib/tools.jar
    Is that because I installed a wrong jdk?

    I tried to search out where is the tools.jar, I got this:
    Code:
    locate tools.jar
    /usr/lib/jvm/java-6-sun-1.6.0.06/lib/tools.jar
    Is the the same tools.jar that required by ant? If it is how can I point ant to this file?
    Try:

    Code:
    sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts
    Steady movement is more important than speed, much of the time. So long as there is a regular progression of Stimuli to get your mental hooks into, there is room for lateral movement. Once this begins, its rate is a matter of discretion.

  3. #3
    Join Date
    Jun 2008
    Location
    imjscn
    Beans
    130

    Re: need help in installing java jdk

    I have sun-java6-jre,plugin and fonts installed, and they are working nicely. Anyway, instead of fix a problem, I decide to remove the jdk that I installed from Sypnatic. I download newest version of jdk from Sun. According to the instruction, I'll need to be the root to extract and install like this:
    Code:
    chmod a+x jdk-6u7-linux-i586-rpm.bin
    ./jdk-6u7-linux-i586-rpm.bin
    To become the root, I typed in su and password, it returns:
    Code:
    su: Authentication failure
    if I type in sudo, it doesn't work--it returns nothing
    Code:
    sudo chmod a+x jdk-6u7-linux-i586-rpm.bin
    What's the right way to do the job?

  4. #4
    Join Date
    Mar 2008
    Location
    City of Pines
    Beans
    3,585

    Re: need help in installing java jdk

    Quote Originally Posted by imjscn View Post
    I have sun-java6-jre,plugin and fonts installed, and they are working nicely. Anyway, instead of fix a problem, I decide to remove the jdk that I installed from Sypnatic. I download newest version of jdk from Sun. According to the instruction, I'll need to be the root to extract and install like this:
    Code:
    chmod a+x jdk-6u7-linux-i586-rpm.bin
    ./jdk-6u7-linux-i586-rpm.bin
    To become the root, I typed in su and password, it returns:
    Code:
    su: Authentication failure
    Root password is disabled by default in Ubuntu. You have to enable it first and set the password.

    To become root, you could just do:

    Code:
    sudo -i
    and enter your own password.

    Quote Originally Posted by imjscn View Post
    if I type in sudo, it doesn't work--it returns nothing
    Code:
    sudo chmod a+x jdk-6u7-linux-i586-rpm.bin
    What's the right way to do the job?
    Code:
    sudo chmod +x jdk-6u7-linux-i586-rpm.bin
    Code:
    sudo ./jdk-6u7-linux-i586-rpm.bin
    Steady movement is more important than speed, much of the time. So long as there is a regular progression of Stimuli to get your mental hooks into, there is room for lateral movement. Once this begins, its rate is a matter of discretion.

  5. #5
    Join Date
    Nov 2007
    Location
    New Zealand
    Beans
    1,026
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: need help in installing java jdk

    Definitely use the Sun JDK from the Ubuntu repositories.

    1. Make sure you have the "multiverse" repositories enabled.

    2. Install all Sun Java 6 packages...

    Code:
    sudo apt-get clean
    sudo apt-get update
    sudo apt-get install sun-java6*
    3. Check that you are using the newly installed JDK...

    Code:
    javac -version
    The output should be something like...

    Code:
    javac 1.6.0_06
    4. Check that you are using the correct JRE...

    Code:
    java -version
    The output should be something like...

    Code:
    java version "1.6.0_06"
    Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
    Java HotSpot(TM) Client VM (build 10.0-b22, mixed mode, sharing)
    If you find you are not using the correct Sun Java 6 JRE you can fix it by...

    Code:
    sudo update-alternatives --config java
    The above command will let you choose which JRE to make default if you have multiple JRE's installed.

  6. #6
    Join Date
    Jun 2008
    Location
    imjscn
    Beans
    130

    Re: need help in installing java jdk

    Thanks! I managed the root permission and installed the RPM.bin file. Now the real problem comes---after install, it says
    Code:
    inflating: sun-javadb-javadoc-10.3.1-4.1.i386.rpm  
    ./jdk-6u7-linux-i586-rpm.bin: 610: rpm: not found
    ./jdk-6u7-linux-i586-rpm.bin: 610: rpm: not found
    Installing JavaDB
    ./jdk-6u7-linux-i586-rpm.bin: 610: rpm: not found
    When the **** hits the fan, it hits big time

    Please...how to uninstall the rpm file manually? After uninstall, I'll go with repositories.

  7. #7
    Join Date
    Oct 2007
    Location
    Europe
    Beans
    3,564
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: need help in installing java jdk

    Quote Originally Posted by imjscn View Post
    Thanks! I managed the root permission and installed the RPM.bin file. Now the real problem comes---after install, it says
    Code:
    inflating: sun-javadb-javadoc-10.3.1-4.1.i386.rpm  
    ./jdk-6u7-linux-i586-rpm.bin: 610: rpm: not found
    ./jdk-6u7-linux-i586-rpm.bin: 610: rpm: not found
    Installing JavaDB
    ./jdk-6u7-linux-i586-rpm.bin: 610: rpm: not found
    When the **** hits the fan, it hits big time

    Please...how to uninstall the rpm file manually? After uninstall, I'll go with repositories.
    did you really installed this package? to install it you have to convert the .rpm to .deb with alien.
    rpm don't work with debian/ubuntu systems
    you should just download the simple bin file from the sun website, but it's best you stick with the repos java, you don't get a firefox plugin with the sun bin file.

  8. #8
    Join Date
    Jun 2008
    Location
    imjscn
    Beans
    130

    Re: need help in installing java jdk

    I see, perhaps it was just extracted but didn't install. That's a great thing.So, now, where can I go to delete those extracted files?

  9. #9
    Join Date
    May 2006
    Location
    Switzerland
    Beans
    2,907
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: need help in installing java jdk

    Quote Originally Posted by imjscn View Post
    Please...how to uninstall the rpm file manually? After uninstall, I'll go with repositories.
    RPM's (= Red Hat Package Manager) are for RPM-based Linux distributions such as Red Hat, Fedora, OpenSUSE, SLES, SLED, NLD, and so on.

    Distributions based on Debian Linux such as Ubuntu don't use RPM packages. Here you're supposed to use *.deb packages and preferably those which you can easily get from your distribution's APT repositories!

    As for your question: The RPM package is not even installed, so all you have to do is to delete the *.rpm file(s) which you downloaded.

    Don't forget to do what "tinny" a few postings further up told you.

  10. #10
    Join Date
    Oct 2007
    Location
    Europe
    Beans
    3,564
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: need help in installing java jdk

    and check with synaptic if you also have open-java/open-jdk installed
    remove all the open-jdk packages if they are installed, just keep the sun-java installed.

Page 1 of 2 12 LastLast

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
  •