This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
The -cp command-line flag instructions the Java Virtual Machine to look in a series of directories/jar files for the bytecode you wish to execute; a single period ("dot") tells it to look in your current directory.
P.S. You may want to check out my book, Beginning Java Objects -- I make sure to cover all of the nitty-gritty details liable to trip up newcomers to Java (like explaining the -cp flag), leaving nothing to chance!
J. [ July 19, 2005: Message edited by: Jacquie Barker ]
In your haste to come in and ask a question, you seem to have missed reading our policy on display names, which quite clearly states that you must use a real (sounding) first and last name for your display name -- no joke names, "handles," or last initials are acceptable. You can fix your display name here. Thanks for your cooperation!
As to your question: if you've successfully compiled HelloWorld.java, you ought to have a file named "HelloWorld.class" in your working directory -- i.e., if you say "dir" or "ls" or whatever is appropriate for your platform, you should see this file. If you don't, but you can find the file somewhere else, change into that other directory, and do what Jacquie says. If you can't find that file, then the "javac" step didn't actually work, so we need to back up a bit.
We're assuming your HelloWorld.java file contains a class named "HelloWorld". If your class name isn't the same as the file name, it's the class name that you need to use in the "java" command, not the name of the Java file, which is irrelevant.