This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Beginning Java and the fly likes Running a java Program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic

Running a java Program

Preety Narashimhan

Joined: Aug 19, 2002
Posts: 28
I work on Win2000 Professional. I cud complie a simple java prg i wrote but was unable to run it.When i tried the same thing on Win98 it works!!! What cud b the probable reasons??
I have set the path to the bin directory.Do i need to set the classpath??
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
Hi er uh Java Learner,
First of all, this is the wrong forum for this question. Second, if you want an answer to this and as many java questions as you can dream up, you need to change your display name to a first and last name as is the JavaRanch policy. Try changing your first and last names and then posting this on the Java in General (Beginners) forum.
Michael Morris

Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
Preety Narashimhan

Joined: Aug 19, 2002
Posts: 28
sorry for posting at the wrong place ... well now that i have changed my profile i do hope to get an answer
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17250

Hi Preety,
Thanks for changing you Name to meet our Naming Policy.
I am going to move this question to the correct forum (Java Beginner Forum) so that you can get an answer.
In Windows 2000 there are environment variables like path to BIN, and also the "." so that it runs in the same directory as your compiled code.

Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Anthony Villanueva
Ranch Hand

Joined: Mar 22, 2002
Posts: 1055
Please see this thread.
jQuery in Action, 2nd edition
subject: Running a java Program