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

Can any please advise me on how to run the java file using command prompt?

 
Zubi Pen
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a java file with the main method in it and need to run the file using ms dos. These
are the Enviroment Variables setting I have:

CLASSPATH C:\Program Files\Java\j2re1.4.2_12\lib\ext\QTJava.zip
QTJAVA C:\Program Files\Java\j2re1.4.2_12\lib\ext\QTJava.zip

All my java code is in the D:\project\student folder

Can any please advise me on how to run the java file using command prompt?

Thanks,
Zub
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Getting Started tutorial has some good examples. Follow Hello World to the Windows section for command line instructions. I made THIS to help someone with the next steps after that. Let us know if those help.
[ November 02, 2007: Message edited by: Stan James ]
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15214
36
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
C:\> d:
D:\> cd "project\student folder"
D:\project\student folder> java -classpath . MyProgram
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic