• Post Reply Bookmark Topic Watch Topic
  • New Topic

deploy a .zip that includes some .jar files  RSS feed

 
ben oliver
Ranch Hand
Posts: 375
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

set classpath="d:\thirdParty.jar"..

"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.

Thanks.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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".
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!