I have installed the JDK package using $sudo apt-get install java-1.7.0-openjdk-devel. But now when I am running javac, it is giving the error message "Command not found". I am working from Ubuntu Gnome.
13 Answers
Try this: sudo apt-get install openjdk-7-jdk
You got wrong package installed. The one which you instlled is not for Debian/ubuntu, its for Fedora, Oracle Linux, Red Hat Enterprise Linux, etc. Refer this link on OpenJDK site. Do
sudo apt-get install openjdk-7-jdkBefore running above, I would suggest you delete the wrong package using
sudo apt-get purge java-1.7.0-openjdk-devel Is javac as compiler part of devel package?!
But thing now is after apt-get install simply make a query with
whereis javac
The directory is shown and then cd to this location of javac and compile there your sourcecode snippets.
Or type correctly for compiling this :
/usr/bin/javac listing-name.java
Linux as usual wants and needs exact names and specific locations.
1