File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes running java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "running java" Watch "running java" New topic

running java

keith wheeldon

Joined: Jun 26, 2004
Posts: 2
ive justpicked up a java 2 beginners guide to start learning java.i copied this simple program in word pad:class example{public static void main(string args[]){
system.out.println("java drives the web");}}
and it says that the java sdk 1.4 version that i down loaded runs in command prompt and that i should compile like this:c:\>javac
but when i press enter i get javac is not a recognisable command.please help as i havent a clue what im doing and i feel i might be going in over my head but im determined to learn java
Darin Niard
Ranch Hand

Joined: Jun 08, 2004
Posts: 118
You need to put the directory where javac lies in your PATH environment variable.
[ June 26, 2004: Message edited by: Darin Niard ]
Ben Buchli
Ranch Hand

Joined: Mar 26, 2004
Posts: 83
Hey Keith,
I'm not sure about this, but word pad might add formatting characters (which the compiler cant read), so you may want to try a different word editor such as notepad. Or you can download an IDE such as eclipse and use that.
hope that helps.

Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
Welcome to JavaRanch, keith!

You'll likely want to follow the instructions specific to your operating system, as described in the "Your First Cup of Java" lesson of Sun's Java Tutorial.

If you can't get things working, just ask for more help. Folks around here will be glad to help.

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
I agree. Here's the link:
subject: running java
It's not a secret anymore!