Results 1 to 2 of 2
  1. #1
    esolve is offline Member
    Join Date
    Mar 2015
    Posts
    56
    Rep Power
    0

    Default why I can see the jdk version, but can't run javac on linux?

    Java Code:
    esolve@mypad:~/temp$ java -version
    java version "1.7.0_75"
    OpenJDK Runtime Environment (IcedTea 2.5.4) (7u75-2.5.4-1~trusty1)
    OpenJDK 64-Bit Server VM (build 24.75-b04, mixed mode)
    esolve@mypad:~/temp$ javac HelloWorld.java 
    program  'javac' is in the following packages:
     * default-jdk
     * ecj
     * gcj-4.8-jdk
     * openjdk-7-jdk
     * gcj-4.6-jdk
     * openjdk-6-jdk
    please try:sudo apt-get install <package>
    I see there is jdk in my ubuntu system
    but when I run javac, it asks me to install a jdk
    why?

  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,717
    Rep Power
    17

    Default Re: why I can see the jdk version, but can't run javac on linux?

    I see there is jdk in my ubuntu system
    No, the first message is saying that java is on the path somewhere. The second message is saying that javac is not found and is reccomending that you install it. openjdk is good (I have no idea what the default-jdk is).

Similar Threads

  1. Replies: 5
    Last Post: 06-02-2011, 06:59 AM
  2. Replies: 0
    Last Post: 01-04-2011, 07:44 PM
  3. Replies: 1
    Last Post: 12-18-2010, 04:44 PM
  4. Replies: 6
    Last Post: 04-08-2009, 04:05 AM
  5. Wrong version of javac/java
    By amir650 in forum Eclipse
    Replies: 0
    Last Post: 09-12-2008, 11:33 PM

Posting Permissions

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