The file that you are compiling is mypack.java, which is in the MYpack directory. This is the file location that you need to provide to javac.
But the resulting class file will be identified by its qualified name, which includes the package. So when specifying the class for java to run, use MYpack.mypack. Understand that the class "MYpack.mypack" is not in the MYpack directory, but is instead in the bin directory.
So change the current directory to c:\pro\java\jdk\bin, then compile with...
...and run with...
java MYpack.mypack [ June 05, 2008: Message edited by: marc weber ]
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer sscce.org
Don't put your files in the bin directory; start new directory for your applications.
What package declaration have you got in your classes?
If the package name is the same as the folder they are in, compile with javac MyClass.java then go up one level in the directory structure and execute it with java mypackage.MyClass. If the package name is different from the folder name compile with javac -d . MyClass.java MyOtherClass.java and execute with java mypackage.MyClass rom the same directory.
You ONLY have to change the classpath if you are importing any other .jar files.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com