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 a java Program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
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: 17276

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 - iOS Apps
How to Ask Questions the Smart Way FAQ
Anthony Villanueva
Ranch Hand

Joined: Mar 22, 2002
Posts: 1055
Please see this thread.
I agree. Here's the link:
subject: Running a java Program
It's not a secret anymore!