-5

so I typed in javac -version into my terminal but I don't know which one is my JDK version number.

enter image description here

jmj
  • 237,923
  • 42
  • 401
  • 438
user147219
  • 355
  • 1
  • 4
  • 13
  • 3
    Please copy/paste the content of your terminal into the post, as text. There's no need for an image here. – Jon Skeet Oct 07 '15 at 20:48
  • 1
    You seem not to have a jdk installed, so none of these are the version number. It's just a message telling you that the command `javac` doesn't exist and which packages contain such a command, so you can decide which one to install. – RealSkeptic Oct 07 '15 at 20:49
  • Looks like you need to install a jdk – CollinD Oct 07 '15 at 20:49
  • 1
    It seems like you do not have the JDK installed, or at least the compiler (which is `javac`) is not on the PATH. – hotzst Oct 07 '15 at 20:49
  • you don't have JDk installed. If you need to install `sudo apt-get default-jdk` – Manos Nikolaidis Oct 07 '15 at 20:49
  • The OS is already suggesting you what to do.. just follow it – xiamx Oct 07 '15 at 21:33
  • 1
    I'm voting to close this question as off-topic because you clearly did not read the output you are asking about. – tripleee Oct 08 '15 at 19:15

2 Answers2

0

Check this link out : Java on Ubuntu

Also, It does not look like you have it installed on your system. To install OpenJDK, run this command : apt-get install default-jdk

To check if JDK is installed and running use sudo apt-get install openjdk-6-jdk

Check the results, if you see that there are 0 installed and 0 upgrades, you may need to check the Java binary on your system.

A detailed step is mentioned here : StackOverflow Answer link

Community
  • 1
  • 1
0

This error because of JAVA Not installed in your pc.

Follow this commands in order

su -
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
apt-get update
apt-get install oracle-java8-installer
exit

Note: Some times when you run su - command in terminal its throw this kind of error su: Authentication failure. So then use sudo front of su - command. (Ex sudo su -)

and to check java version use java not javac

java -version

javac is used with C Language

Abdulla Nilam
  • 36,589
  • 17
  • 64
  • 85