Javac package is missing

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.

1

3 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-jdk

Before 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

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like