Problems opening file from command line in Eclipse

牧云@^-^@ 提交于 2020-01-06 12:53:25

问题


I want my RCP Eclipse application to open files from the command line when given the filename as an argument, so the OS can associate the RCP with some extensions.

I found that the eclipse.ini file must specify the default action with

--launcher.defaultAction
openFile

This is set in my .ini file, but when I call the executable followed by a filename, it doesn't open the file. Do I need something else? Some plugin?


回答1:


I found the solution here: http://www.sigasi.com/content/make-eclipse-open-files-command-line.

The executable name must be the same as the one set in the appName property in the plugin.xml of the RCP. Now it works.



来源:https://stackoverflow.com/questions/17712827/problems-opening-file-from-command-line-in-eclipse

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!