Deliver Your Java Application in One-JAR!
These days I'm finishing another course about Java and JDBC - everything was ok during the course and I decided to deploy the complete sample application to my students through their mailing list. The project is a simple Swing/JDBC application accessing a few tables in the MySql.
When I created the deployable JAR I detected a surprising detail: I canÂ´t distribute my application in a single JAR because there is a dependency with the MySql - and the driver couldn't be accessed inside the application JAR due to classpath details.
This is a strange feature of the JAR tool because it force the users to download several files or use an external unzip tool in order to unzip the files before running the aplication - very odd.
I know we can use WebStart with its fantastic features - but IÂ´m trying to distribute a simple application, it seems much more elegant if I got it packed in a only file.
I opened a thread in the Java Programming Forum and the answers motivated me to share this curious gap about the JAR tool.