Thanks for your advise, cindy.
My problem is:
For example, I have two class files named: One.class and Two.class. Two.class has the main method. They belong to a package named: package01.
So the source code for One.jar is like:
package package01;
public class One {
...........
}
And the source code for Two.jar is like:
package package01;
public class Two {
...........
public static void main(
String args[]) {
}
}
I would like to deploy this application. So I follow these steps:
1) Make a manifest file named Manifest.mf
Main-Class: package01.Two.class
2) Make a jar file named: application.jar
jar.exe cvfm application.jar Manifest.mf One.class Two.class
3) Run the jar file:
java.exe -jar application.jar
It gave me the following error: "Exception in
thread "main" java.lang.NoClassFoundError: prototype02/Two ".
My file structure is:
D:\project\src\package01\One.java
\Two.java
\class\package01\One.class
\Two.class
\Manifest.mf
\application.jar
I don't know exactly where went wrong. Please help! Thanks a lot!
qionghua