我已经安装了JavaFX 2.0 SDK,现在我想用Eclipse做一个JavaFX应用程序.但是我如何javafx.*在Eclipse中使用这些类?
在官方的JavaFX Eclipse插件似乎是为JavaFX 1.2和过时.
当我尝试安装e(fx)clipse插件时,我收到此错误:
Cannot complete the install because one or more required items could not be found.
Software being installed: efxclipse 0.0.8.201111131640 (at.bestsolution.efxclipse.feature.feature.group 0.0.8.201111131640)
Missing requirement: Eclipse DI integration for JavaFX 0.0.8.201111131640 (at.bestsolution.efxclipse.runtime.di 0.0.8.201111131640) requires 'bundle org.eclipse.e4.core.contexts 0.9.0' but it could not be found
Cannot satisfy dependency:
From: efxclipse 0.0.8.201111131640 (at.bestsolution.efxclipse.feature.feature.group 0.0.8.201111131640)
To: at.bestsolution.efxclipse.runtime.feature.feature.group [0.0.8.201111131640]
Cannot satisfy dependency:
From: FX Runtime 0.0.8.201111131640 (at.bestsolution.efxclipse.runtime.feature.feature.group 0.0.8.201111131640)
To: at.bestsolution.efxclipse.runtime.di [0.0.8.201111131640]
Run Code Online (Sandbox Code Playgroud)
Ser*_*nev 40
有两种选择:
1)编辑:自7u35(或附近的smth )以来,JavaFX被包含在基本JDK类路径中,因此您可以立即使用JavaFX类.
只需将项目设置为使用fx库:
JavaFX 2.0 API是纯Java.因此,您可以创建一个新的Java项目并添加sdk-path/rt/lib/jfxrt.jar到库中以在该项目中使用JavaFX.
对于JDK7中的cobundled构建,下一步将是路径 jdk-path/jre/lib/jfxrt.jar
2)使用e(fx)clipse插件:http://www.eclipse.org/efxclipse/index.html
Val*_*anu 13
你可以使用e(fx)clipse!你可以在这里找到它:http://www.eclipse.org/efxclipse/index.html
下载后,必须使用JavaFX SDK配置IDE(必须安装).
您需要做的就是打开Window> Preferences> JavaFX并配置JavaFX-SDK的位置.
你可以在程序文件> Oracle中使用它.
希望对你有帮助!
| 归档时间: |
|
| 查看次数: |
67341 次 |
| 最近记录: |