You need to set up the classpath anyway, and this would be an extremely minor point.
Will that understand the dependencies too?
Monica. Shiralkar wrote:I went to the folder where all classes including the MainClass is. After this I ran the command java cf Temp.jar /*.class
After this I saw the contents of jar using java tf command. i could see MainClass.class too.
Now I ran the command java -cp Temp.jar com.MainClass
It gave a message Error: Could not find or load main class com.MainClass
Monica. Shiralkar wrote:Yes it is in com directory.
Monica. Shiralkar wrote:I went to the folder where all classes including the MainClass is. After this I ran the command java cf Temp.jar /*.class
Monica. Shiralkar wrote:
./run.sh
Error: Could not find or load main class com.MyMainClass
I am running it from the same folder where MyApp.jar is present which has com.MYMainClassName
Monica. Shiralkar wrote:jar -tf MyApp.jar
META-INF/
META-INF/MANIFEST.MF
MyClassName.class
META-INF/
META-INF/MANIFEST.MF
com/
com/MyClassName.class
Consider Paul's rocket mass heater. |