Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

running java

 
keith wheeldon
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 example.java
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
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Ben
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic