Java cmd doesn't find a created package during execution
Hi all,
I created a package and modified the CLASSPATH in order to compile a program using my package.
The compilation passed without errors nor warnings.
Problem:
When I invoked my program by using the following cmd line: java <Main Class Name>
I got an error message telling me that the Main method is not found : no found class error.
Please let me know if you need more details to solve this problem.
Thanks,
Louiza.
[502 byte] By [
boujidal] at [2007-9-26 1:33:36]

The java command expects the full class name as its argument. If the class that has the main() method is part of a package, then the full class name is package_name.class_name. So if your class is MyClass.class and part of a package called mypackage then the command must be "java mypackage.MyClass"
MyClass.class must be in a directory named mypackage and the directory that contains mypackage must be in the Classpath.
Hopefully, the method is main, not Main.