Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 eclipse 应用程序来运行我的 dsl。我想添加一个从正在运行的 ui 中获取文件并做某事的功能。
如何在运行时获取插件的文件目录?
谢谢,丹娜
myPlugin.getBundle().getLocation()
或者
URL pluginUrl = myPlugin.getBundle().getEntry("/"); pluginUrl = FileLocator.resolve(pluginUrl); File pluginLocation = new File(pluginUrl.getFile);