This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
The application that I have calls CMD.EXE and runs a .bat file as a seperate process.Is there a way that I can inclued the .bat file in the one of the jar? can I call it from getRuntime().exec() in my application.
My guess is that you would have to extract it out of the jar file and then run cmd.exe on it. You could use the java.util.jar.JarFile to extract the file into a known directory and then build the command line to point to the .bat file in the known directory. It should not be too bad.
Let us know how it goes,
Jeff Osborn<br />Procelerate Technologies<br /><a href="http://procelerate.com" target="_blank" rel="nofollow">procelerate.com</a>
Joined: Jun 12, 2006
Oh yes, I forgot to add that I�m not a big Web Start guy, so there may be some kind of slick deployment xml way to get Web Start to unpack files out of the jar.
Baring that, I would go with the above method.
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