我遇到了一些问题。我正在eclipse中开发一个插件,我正在使用JavaFX来创建用于面部检测的GUI。问题是我需要从我的包中获取类型为“org.eclipse.core.runtime.Platform;”的资源。我导入了“import javafx.application.Platform;”为了像这样更新Ui:
Platform.runLater(new Runnable() {
@Override
public void run()
{
frameView.setImage(tmp);
}
});
}
}
};
正如您所看到的,如果我尝试导入“org.eclipse.core.runtime.Platform”,则导入之间存在冲突。使用“Bundle bundle = Platform.getBundle(”Recognize“);”
导入JavaFX Platform时是否有办法访问此捆绑包?
答案 0 :(得分:0)
您只需要为其中一个使用完全限定的类名(特别是对于您不导入的类名):
import javafx.application.Platform ;
// ...
Platform.runLater(() -> { /* ... */});
// ...
Bundle bundle = org.eclipse.core.runtime.Platform.getBundle("Recognise");