View Full Version : Quick Question about compiling Java

January 16th, 2011, 07:11 PM
I know I sound like a complete noob when I say this but how do you compile Java through the command line. I know how to use the command line and I have searched all over Google but i have yet to find a guide to explain on how to use javac to compile a java file

I thought it was just like using the command prompt in windows where all you type is

~$ javac TestFile.java

and that was it. (and all the paths are leading to the right directories and the files are named and typed in correctly)

I am sorry for asking such a noob question but can some one please help.

January 16th, 2011, 07:22 PM
What's happening when you type what you posted at the command line? If you don't get any errors, it's probably working.

But if it's not working, you may not have the JDK installed. Try

sudo apt-get install build-essential

Good luck.

BTW - there's a great sub-forum here for talking programming. It's the Programming Talk sub forum.