通過Eclipse插件在工作區中運行一個類?

[英]Run a class in workspace via Eclipse plug-in?


I am working on an Eclipse plug-in project and I want to to be able run a specific class via this plug-in.

我正在開發一個Eclipse插件項目,我想通過這個插件運行一個特定的類。

For example I added a button to the eclipse interface and I want this button runs one specific Java class.

例如,我在eclipse界面添加了一個按鈕,我希望這個按鈕運行一個特定的Java類。

I am looking through the tutorials etc but I couldn't find how to make this.

我正在瀏覽教程等,但我找不到如何做到這一點。

Is there anyone that can give me some intuition?

有沒有人可以給我一些直覺?

Best

1 个解决方案

#1


You could use Runtime.exec(). But for a cleaner approach refer 'Commons Exec' library.

您可以使用Runtime.exec()。但是為了更清潔的方法,請參考'Commons Exec'庫。


注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2015/05/04/7251949ec5d129e2d60fcd8292a093c5.html



 
粤ICP备14056181号  © 2014-2021 ITdaan.com