This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have this class file that is used to send mails. This file requires 2 jars, activation.jar and mail.jar. Both these jars are included in the classpath. This classfile runs perfectly when i run from the cmd or from eclipse.
But my requirement is that i need to make a jar file of the classfile. I have taken all the required steps while creating the jar file. I created a manifest.txt file and it has 2 entries, Main-Class and Class-Path. I have created jars using both cmd and eclipse. When I run the jar file i get the error
I knew it was something obvious. My jar could not see the other jars. The reason being, there is file called Manifest.txt, in which you specify 2 parameters, in case your jar file has a main class and the path of other jar files that are required to run the main jar file.