Executing a Java Program from the command line (c:\ prompt)
I am not using an IDE but using the command line only to compile and execute Java programs. I can compile a programme but cannot execute it from the command line - apparently it is bug ref 4546372 - I cannot access the information about this bug on the Knowledgebase to know how to fix the bug - can anyone help?
Many thanks
Mel
[347 byte] By [
meella] at [2007-10-3 1:36:48]

I can't find that bug in the [url=http://bugs.sun.com/bugdatabase/index.jsp]bug database[/url].
It would be easier to help you if you explained what happens, what exactly you are doing and what error messages you get. Just saying "I cannot execute a program" and referring to a bug that isn't in the bug database is not enough information to help you.
How did you discover that your problem has to do with that specific bug number?
Have a look at the [url=http://java.sun.com/docs/books/tutorial/getStarted/cupojava/win32.html]Hello World Tutorial[/url], it explains step by step how to compile and run a Java application from the command prompt.
If your program is named pgm1 then you compile it as follows:
javac pgm1.java
But to execut it you use the following
java pgm1
In other words you do not issue
java pgm1.java
If javac is accessible then java is accessible too.
I never had a problem with compiling and running JAVA programs
from command line.