Let's say I have:
core.jar
client.jar (contains 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 could I get the manifest-file from "super_mega_client.jar" knowing nothing about it's name and content?
Actualy I need to create an util in core.jar which will work with the jar, executed with "java -jar ***.jar"
OK, here is proper question:
I have main.jar with main-method (lets say in my.app.Main class)
I also have fisrt.jar(with some classes and resources) and second.jar (with some other classes and resources). Both have no main-classes, both have "main.jar" in CLASSPATH, both have Main-Class property defined as "my.app.Main".
I can run my app by executing "java -jar first.jar" or "java -jar second.jar"
In my my.app.Main.main(String[] args)
method (contained in main.jar) I want to know the name of the executed jar (I want to get either "first.jar" or "second.jar")
How could I do it?