Home » Eclipse Projects » Plugin Development Environment (PDE) » how to run bash script programmatically from eclipse plugin
|
Re: how to run bash script programmatically from eclipse plugin [message #50862 is a reply to message #50747] |
Wed, 18 March 2009 18:38 |
Ankur Sharma Messages: 84 Registered: July 2009 |
Member |
|
|
Sana wrote:
Sana wrote:
> Hi
>
> how can i run bash script programmtically from eclipse plugin.
> I tried using java runtime, but it does not work. The script is working
> when called from command line or simple java application.
>
> Runtime.getRuntime().exec(new String{"/home/script.sh","param1","param2"});
>
> regards,
> Sana.
>
> Hi
>
> how can i run bash script programmtically from eclipse plugin.
> I tried using java runtime, but it does not work. The script is working
> when called from command line or simple java application.
>
> Runtime.getRuntime().exec(new String{"/home/script.sh","param1","param2"});
>
> regards,
> Sana.
>
From my experience on windows, you will probably have to prefix
"/bin/bash" before your command.
Runtime.getRuntime().exec(new String{"/bin/bash",
"/home/script.sh","param1","param2"});
|
|
| | |
Re: how to run bash script programmatically from eclipse plugin [message #593393 is a reply to message #50747] |
Wed, 18 March 2009 18:38 |
Ankur Sharma Messages: 84 Registered: July 2009 |
Member |
|
|
Sana wrote:
Sana wrote:
> Hi
>
> how can i run bash script programmtically from eclipse plugin.
> I tried using java runtime, but it does not work. The script is working
> when called from command line or simple java application.
>
> Runtime.getRuntime().exec(new String{"/home/script.sh","param1","param2"});
>
> regards,
> Sana.
>
> Hi
>
> how can i run bash script programmtically from eclipse plugin.
> I tried using java runtime, but it does not work. The script is working
> when called from command line or simple java application.
>
> Runtime.getRuntime().exec(new String{"/home/script.sh","param1","param2"});
>
> regards,
> Sana.
>
From my experience on windows, you will probably have to prefix
"/bin/bash" before your command.
Runtime.getRuntime().exec(new String{"/bin/bash",
"/home/script.sh","param1","param2"});
|
|
| | |
Goto Forum:
Current Time: Tue Apr 23 06:46:40 GMT 2024
Powered by FUDForum. Page generated in 0.05999 seconds
|