Java Compiler

Status
Not open for further replies.

Rouen

In Runtime
Messages
235
I've tried using the Java SDK that comes directly from sun, but I can't find enough documentation to help me use it aside from fairly vague help files that come with it. Example: It tells you to use a text editor to write your code, then to use the javac program within a certain folder to compile it. Strangely enough, it doesn't tell you where to store the file so that it can be compiled, I tried the same folder as javac and it says cannot find the file. STRANGE.

Where can I find a friendly java compiler, preferably with a GUI so I don't have to learn all the command line crap while trying to learn the language too?

Edit: On a Windows XP Pro system.
 
Strangely enough, it doesn't tell you where to store the file so that it can be compiled
That's because you can store the file anywhere.

preferably with a GUI so I don't have to learn all the command line crap while trying to learn the language too?
It is definitely in your best interest to become familiar with the command line.

First, you should open a command prompt and type "javac" (without the quotes). If you get a message saying that "'javac' isn't recognized...", then you'll need to adjust your Windows environment variables. Otherwise, to compile your code, you need to tell the java compiler where your file is. When you open the command prompt, you'll notice that a directory is specified (ie, C:\Documents and Settings\username\...). That is the default path that the compiler will look in to find your file. So, you have two options.
1. Specify the full path to your file (javac C:\Documents and Settings\username\...\filename.java) or
2. use the cd command to move to the appropriate directory.
 
Learning how to use the command line, that brings me to my previous point, where is the documentation that explains how to use the SDK?
 
Try Eclipse. If you have the Java environment set up as jaeusm said, Eclipse is the Java IDE to use and will keep you out of the console for awhile. It comes with many tutorials and there are dozens more on the Eclipse website as well as others. :)
 
Status
Not open for further replies.
Back
Top Bottom