Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Execute console commands, show output in console view
Execute console commands, show output in console view [message #490090] Wed, 07 October 2009 05:46 Go to next message
Vitaliy Volevach is currently offline Vitaliy Volevach
Messages: 13
Registered: August 2009
Junior Member
Hello,

I'm using eclipse 3.4.2 on linux x64. In my plugin I want to execute
some linux console commands/scripts and show the output in the eclipse
console view.
For me it is also important that the shell from which eclipse was
started is used for input as there are some environment variables set I
want to use.
So, how can I do it?

Regards
Vitaliy
Re: Execute console commands, show output in console view [message #491594 is a reply to message #490090] Thu, 15 October 2009 04:00 Go to previous message
Ravi  is currently offline Ravi
Messages: 27
Registered: July 2009
Junior Member
I am afraid you can't get the shell from which the eclipse is launched. Eclipse runs in JVM and so it isn't aware how is it lauched (AFIAK). You could always run Runtime.getRuntime().exec to execute system command. Write a script that will do the environment setup and call it before launching your custom script. Hope this helps

Thanks,
Ravi
Previous Topic:My osgi.framework.extensions got deleted from the config.ini by eclipse
Next Topic:API to find whether user has chosen to delete contents while deleting the project
Goto Forum:
  


Current Time: Thu Aug 28 19:18:53 EDT 2014

Powered by FUDForum. Page generated in 0.01561 seconds