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!
1) How do these two options differ?
What is the difference between runnable jar library handling options?
2) what are these new classes added by the second option?
orgpackage is for jar-in-jar-loader. Withpackage optionit would become fat jar and your main class would not be the real main any more, see manifest in that case.From Ant, but you get the idea right?
3) Also, is there any difference between a non-runnable and runnable jar except for their manifest files?
I don’t think so, however exporting non-runnable jar from Eclipse you can specify files to include and not more flexibly.