0

I'd like to create an eclipse plug-in that, when activated (via some extra menu or context menu) starts a standalone java application that was downloaded as part of the plug-in package. I am new to eclipse plug-in development, so I'm not quite sure what I would need to do to achieve this.

Would it be possible to include the standalone application's files within the source of the plugin and have the plugin run shell code to execute the application?

1 Answer 1

1

I believe that all you have to do is execute the corresponding command via

Process p = new ProcessBuilder().command("your shell command here").start()

That will create a new process and run whatever program you have. I think Eclipse will allow you to do this (there are plenty of plugins that start web servers and whatnot). However, unless you do something rather special (like implement a new run configuration type for webservers or suchlike), this seems like a bad idea.

2
  • Thanks, I'm experimenting with this. If I have to run multiple commands (setting up some chmods, etc), would this execute them each within a separate process, or all within the same one?
    – Rowhawn
    Jun 11, 2012 at 22:21
  • You can only run a single command each time. If you want to simply bundle a couple of things, I'd recommend to write a shell script and call that.
    – Jochen
    Jun 12, 2012 at 7:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.