I hope you can help me. Some time ago I wrote an application to download some stuff from the web and do something with that: since I needed functionalities provided in external packages, I unzipped those binaries and jarred them up together with my classes, getting a monolitic jar with my and external functionalities. Now, apparently a much better way of doing this is jarring just my stuff, and running this jar using "classpath" to refer to external jars...
So, I created my slimmed "myJar.jar" in C:\ and the external ones in C:\lib\, and I am trying to run this using a Command Prompt in Windows XP BUT... I can't find a way of specifying the classpath. The command I am trying to run is:
I googled quite a lot, I found different versions about the use of single or double quotes around the imported jars, another site suggested to specify the Class-Path in the MANIFEST contained in myJar.jar (looks a bad solution though, given that if I change the location of the external jars in the future I will need to update the MANIFEST as well)...
Any suggestion? Please help me, I am desperate and this is probably a trivial problem....
When you use the "-jar" option, then the "-classpath" parameter is ignored and the classpath comes from the Class-Path entry in the jar's manifest. I assume you already read about that, since that other site told you about it. Your objection about not liking that idea because you might move the dependent jars is just lame. Put them in the same directory as your executable jar, so it's easy to specify Class-Path, and don't move them.
Joined: May 03, 2006
Thank you Paul
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com