简体   繁体   中英

which of these is my jdk version number?

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

在此处输入图片说明

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM