I have folder called bin in which i have put all my class files and the required jars file . I have 4 jarfiles
I created a manifest file Test.txt inside the bin folder
and the content is given below
Manifest-Version: 1.0
Main-Class: com.school.Main
Class-Path: ./charsets.jar ./cryptix32.jar ./jfreereport-0.8.4_10-all_new.jar ./mysql-connector-java-3.0.8-stable-bin.jar
from command promt i went to that bin folder and excuted
jar cvfm Myproject.jar Test.txt *.*
It created the jar file in inside the bin folder ... and if i double click jar
when its in the bin folder it is working
but if i take that jar from that folder and place in some other folder its
not working. error saying
Could not find the main class
And if i copy those jar file which are required to the same folder where
i have myproject.jar then it started working
My doubt is i already bundled all the jar required in the same myproject
jar . then y its not reading that jars.
Is my classpath set in mainfest file wrong .. if yes how to set it
I created a manifest file Test.txt inside the bin folder
and the content is given below
Manifest-Version: 1.0
Main-Class: com.school.Main
Class-Path: ./charsets.jar ./cryptix32.jar ./jfreereport-0.8.4_10-all_new.jar ./mysql-connector-java-3.0.8-stable-bin.jar
from command promt i went to that bin folder and excuted
jar cvfm Myproject.jar Test.txt *.*
It created the jar file in inside the bin folder ... and if i double click jar
when its in the bin folder it is working
but if i take that jar from that folder and place in some other folder its
not working. error saying
Could not find the main class
And if i copy those jar file which are required to the same folder where
i have myproject.jar then it started working
My doubt is i already bundled all the jar required in the same myproject
jar . then y its not reading that jars.
Is my classpath set in mainfest file wrong .. if yes how to set it
Comment