如何在Eclipse中使用JavaFX 2 SDK?

编程入门 行业动态 更新时间:2024-10-21 11:56:26
本文介绍了如何在Eclipse中使用JavaFX 2 SDK?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我已经安装了JavaFX 2.0 SDK,现在我想用Eclipse做一个JavaFX应用程序。但是如何在Eclipse中使用 javafx。* 类?

官方JavaFX Eclipse插件似乎是针对JavaFx 1.2而过时的。

当我尝试安装 e(fx)剪辑插件时,我收到以下错误: / p>

无法找到一个或多个所需项目,因此无法完成安装。 正在安装的软件:efxclipse 0.0.8.201111131640(at.bestsolution.efxclipse.feature.feature.group 0.0.8.201111131640)缺少要求:JavaFX的Eclipse DI集成0.0.8.201111131640(at.bestsolution.efxclipse。 runtime.di 0.0.8.201111131640)需要bundle org.eclipse.e4.core.contexts 0.9.0但是找不到无法满足依赖关系: From:efxclipse 0.0.8.201111131640(at。 bestsolution.efxclipse.feature.feature.group 0.0.8.201111131640)至:at.bestsolution.efxclipse.runtime.feature.feature.group [0.0.8.201111131640] 无法满足依赖关系:从: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]

解决方案

有两个选项:

1)编辑:由于7u35(或近距离),JavaFX被包含进入基础JDK类路径,以便您可以立即使用JavaFX类。

只需设置您的项目以使用fx libs:

JavaFX 2.0 API是纯Java。因此,您可以创建一个新的Java项目,并将 sdk-path / rt / lib / jfxrt.jar 添加到库中以在该项目中使用JavaFX。

对于JDK7路径中的配套构建将在下一个 jdk-path / jre / lib / jfxrt.jar

2)使用e(fx)剪辑插件: http:/ /www.eclipse/efxclipse/index.html

I have installed JavaFX 2.0 SDK and now I would like to do an JavaFX application with Eclipse. But how can I use the javafx.* classes in Eclipse?

The official JavaFX Eclipse plugin seem to be for JavaFx 1.2 and outdated.

When I try to install e(fx)clipse plugin, I get this error:

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]

解决方案

There are two options:

1) EDIT: Since 7u35 (or smth near it) JavaFX was included into base JDK classpath so you can use JavaFX classes right away.

Just set up your projects to use fx libs:

JavaFX 2.0 API is pure Java. So you can create a new Java project and add sdk-path/rt/lib/jfxrt.jar to libraries to use JavaFX in that project.

For cobundled builds in JDK7 path would be next jdk-path/jre/lib/jfxrt.jar

2) Use e(fx)clipse plugin: www.eclipse/efxclipse/index.html

更多推荐

如何在Eclipse中使用JavaFX 2 SDK?

本文发布于:2023-11-28 07:21:27,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1641450.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何在   Eclipse   SDK   JavaFX

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!