Execute a shell script in a Jar File
Hello,
In UNIX, I have an application in wich i want to execute a shell script.
I would like to put that script in the jar file and be able to execute it from the main application.
I can get the URL of the script (something like jar:file:....) but I can't find a way to then execute this script from the Runtime.exec command.
Does someone know how to do that ?
Many thanks.
[411 byte] By [
ProZa] at [2007-10-2 23:53:02]

> Hello,
>
> In UNIX, I have an application in wich i want to
> execute a shell script.
> I would like to put that script in the jar file and
> be able to execute it from the main application.
Then do it - write an application that can execute a script. But usually, executing a script is something the shell does, so it'll be the shell that needs to be able to read the file. You have to extract it, or you have to manually issue the commands and handle the piping, using Runtime.exec().