[英]Usage of jfxrt.jar in Eclipse Kepler (SR2) Plugin
i'm, playing with an Eclipse 4 Application and Java 8, currently in Eclipse Kepler SR2. 我正在使用Eclipse Kepler SR2中的Eclipse 4 Application和Java 8。 There are various pitfalls which i don't understand, therefore i'm looking for your help:
我不了解各种陷阱,因此正在寻找您的帮助:
When i create a new plug-in in Java 8 (JDK) environment, the jfxrt.jar is listed in the JRE System Libraries in my project. 当我在Java 8(JDK)环境中创建新的插件时,jfxrt.jar列在我项目的JRE系统库中。
When i try to access a jfxrt class, i'll get an error (Discouraged Access). 当我尝试访问jfxrt类时,会收到错误消息(禁止访问)。 I tried to solve the error adjusting the build path by creating an Access Rule (* / ) to my JRE System Library.
我试图通过创建对JRE系统库的访问规则(* / )来解决调整构建路径的错误。 Sometimes it worked, somestimes i had to adjust the Compiler Settings for Discouraged Access to warning too.
有时它可以工作,有时我也必须将“禁止访问的编译器设置”调整为警告。
Afterwards, i could access the classes and compile them, but when i try to run (debug), the classes are still NOT visible to the plugin: 之后,我可以访问这些类并进行编译,但是当我尝试运行(调试)时,这些类仍然对插件不可见:
java.version=1.8.0
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE
Framework arguments: -product de.fsch.ibot.app.product -clearPersistedState
Command-line arguments: ... -consoleLog -clearPersistedState
!ENTRY org.eclipse.osgi 4 0 2014-04-03 09:15:12.790
!MESSAGE Application error
!STACK 1
.
.
Caused by: java.lang.NoClassDefFoundError: javafx/application/Application
Any suggestions for me ? 有什么建议吗?
My suggestion is: Do yourself some a favor and install e(fx)clipse eg you can get an all in one download from http://efxclipse.bestsolution.at/install.html or use the update-site from http://www.efxclipse.org/install.html and follow https://wiki.eclipse.org/Efxclipse/Tutorials/Tutorial2 if you want to go pure fx (no swt involved) then https://wiki.eclipse.org/Efxclipse/Tutorials/Tutorial3 and https://wiki.eclipse.org/Efxclipse/Tutorials/Tutorial4 are probably interesting to you 我的建议是:帮个忙,安装e(fx)clipse,例如,您可以从http://efxclipse.bestsolution.at/install.html进行一次完整下载,也可以使用http://的更新站点www.efxclipse.org/install.html并遵循https://wiki.eclipse.org/Efxclipse/Tutorials/Tutorial2如果您想使用纯fx(不涉及swt), 请https://wiki.eclipse.org/Efxclipse / Tutorials / Tutorial3和https://wiki.eclipse.org/Efxclipse/Tutorials/Tutorial4可能对您很有趣
For the restricted access, do this: Go to project properties, java build path, libraries. 对于受限访问,请执行以下操作:转到项目属性,java构建路径,库。
Got this from this SO answer . 从这个SO答案中得到了这个。
Annoyingly, this worked for me! 烦人的,这对我有用!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.