I know how to create a executable .jar file. There are many examples of that on the internet. What I am wondering, is if anyone knows of a way that a executable .jar file can auto extract out parts of itself to the "running directory"?
So, instead of:
jar xf TicTacToe.jar TicTacToe.class TicTacToe.properties
java -jar TicTacToe.jar
I would like to only do this:
java -jar TicTacToe.jar TicTacToe.class TicTacToe.properties
This basically makes a self extracting installer. Is this possible, if so, what code is necessary to do this?
NOTE: ultimately, once it works, I will wrap it into launch4j in order to to emulate a .exe self extracting installer.
TicTacToe.properties
or how to get a reference to the executing jar file? – Shrunken