If I have packaged my code into "myapp.jar" file, and this code needs a few third party jar files too. I want to zip all of them together and create a zip file. Inside the zip file I may need a windows "cmd" file like "execute.cmd" that looks like
"java" -classpath "%CLASSPATH%" myapp.Main
After all, I want to send this zip to someone who can unzip on his PC and just run my "cmd" file. But the question is -- I don't know where the user may put the zip and unzip it. How do I specify that in my "classpath" ? I am not a windows guy, please help if you can.
It doesn't matter where the file is unzipped. As long as the .bat file is in the same directory as the jar files, the classpath can reference them directly, like "set CLASSPATH=thirdParty.jar;fourthParty.jar;fifthParty.jar".