I had successfully installed java on my linux
system. When I ran a hello world test sample from desktop it ran successfully, but then after few days when I again tried to run it from terminal using javac
command it gave me following response:
The program 'javac' can be found in the following packages:
* default-jdk
* ecj
* gcj-5-jdk
* openjdk-8-jdk-headless
* gcj-4.8-jdk
* gcj-4.9-jdk
* openjdk-9-jdk-headless
Try: sudo apt install <selected package>
When I test my JAVA_HOME
env. variable using echo $JAVA_HOME
its showing:
/usr/lib/jvm/java-8-openjdk-amd64
its also there with PATH
variable.
When I ran a which java
command its showing:
/usr/lib/jvm/java-8-openjdk-amd64/bin/java
and with command whereis java
its showing:
java: /usr/lib/jvm/java-8-openjdk-amd64/bin/java /usr/share/man/man1/java.1.gz
So, I don't understand the problem, as I, myself applied the env. variables, and its showing everything perfect, then why is not javac
command running? can any one look into this problem.