I was creating a runnable jar using eclipse indigo where I encountered two options:
Extract required libraries into generated jar
and
Package required libraries into generated jar
While the creation using first option generated only a jar file with the application packages and the META-INF
package, the second option also created an org
package.
This org
package was further extended by its sub-folders as org> eclipse> jdt> internal> jarinjarloader
. The jarinjarloader
package contained a few classes I haven't seen before.
This is my manifest file in second option:
Manifest-Version: 1.0
Rsrc-Class-Path: ./
Class-Path: .
Rsrc-Main-Class: main.SimpleCalculator
Main-Class: org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader
main
is my application package and SimpleCalculator
is my main class.
My questions are:
1) How do these two options differ and what are these new classes added by the second option? Also what are the different name-value pairs in the manifest of second option?
2) Also, is there any difference between a non-runnable and runnable jar except for their manifest files allowing the runnable to become executable. (I found option to specify the main-class in my project while creating even a non-runnable jar file, so am I missing something here or is it just eclipse trying to be extra helpful?)
Note: I have some guesses about these two options but they are just that... guesses!
Thanx in advance!