JavaFX 2作为Maven依赖项

编程入门 行业动态 更新时间:2024-10-09 11:26:38
本文介绍了JavaFX 2作为Maven依赖项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

是否可以在pom.xml中将JavaFX 2.0作为Maven中的依赖项引用,以便一切顺利进行?

Is it possible to reference JavaFX 2.0 as a dependency in Maven in the pom.xml so that everything works smoothly?

我在这个问题可以在本地安装jfxrt.jar,但理想情况下我想要一个更简单的方法没有任何本地黑客可以正确地解决和下载依赖.... ....

I saw in this question that it is possible to install the jfxrt.jar locally, but ideally I'd like a simpler approach where the dependency can be properly resolved and downloaded without any local hacks....

推荐答案

不,这样的解决方案不存在暂时的。我怀疑它会永远,因为从Java 1.7更新2开始,JavaFX与JVM一起安装。计划从Java 1.8(明年)开始在JRE中包含JavaFX。从那时起,你根本就不需要依赖。

No, such a solution doesn't exist for the moment. I doubt that it will ever, since as from Java 1.7 update 2, JavaFX is installed together with the JVM. Plans are to include JavaFX in the JRE as from Java 1.8 (next year). From then on, you wouldn't need a dependency at all.

但是你现在已经可以使用Maven和JavaFX了,因为Maven可以调用Ant任务(antrun插件)和JavaFX发行版提供了超级Ant任务。我在博客上写了这篇文章,但它是用法语写的: Creer un projet Maven倒JavaFX2 。它将引导您完成整个过程。然而,如果你不懂法语,请在文章上留言,我会尽力帮助你或者在 Oracle论坛

However you can use Maven with JavaFX now already, because Maven can call Ant tasks (antrun plugin) and there are super Ant tasks available with the JavaFX distribution. I blogged about it, but it's in French: Creer un projet Maven pour JavaFX2. It walks you through the whole process. Nevertheless, if you don't understand French, leave a comment on the article and I will try to help you or look in here in the Oracle forum

更多推荐

JavaFX 2作为Maven依赖项

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

发布评论

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

>www.elefans.com

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