• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

running java

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic