Say I have:
core.jar
client.jar (contains the main method) (uses core.jar)
super_mega_client.jar (uses core.jar, client.jar)
To run my program, I use "java -jar super_mega_client.jar"
How can I get the manifest file from "super_mega_client.jar" without knowing anything about this name and content?
Actualy I need to create a utility in core.jar that will work with a jar executable with java -jar ***. Jar.
OK, here is the correct question:
I have main.jar with the main method (say in the class my.app.Main )
I also have fisrt.jar (with some classes and resources) and second.jar (with some other classes and resources). Both do not have main classes, both have " main.jar " in CLASSPATH, both have a Main-Class property defined as " my.app.Main ".
I can launch my application by executing "java -jar first.jar" or "java -jar second.jar"
In my method my.app.Main.main(String[] args) (contained in main.jar ) I want to know the name of the executable jar (I want to get either first.jar "or" second.jar ")
How can i do this?
source share