Why is JavaFX is not included in OpenJDK 8 on Ubuntu Wily (15.10)?

匿名 (未验证) 提交于 2019-12-03 01:47:02

问题:

I've downloaded OpenJDK 8 today via sudo apt-get install openjdk-8-jdk and it seems like JavaFX is not included in it.

> java -version openjdk version "1.8.0_66-internal" OpenJDK Runtime Environment (build 1.8.0_66-internal-b17) OpenJDK Server VM (build 25.66-b17, mixed mode) 

I've installed E(fx)clipse in latest Eclipse (Eclipse Mars) too, but I'm still getting message javafx couldn't be resolved.

回答1:

According to the packages list in Ubuntu Wily Xenial there is a package named openjfx. This should be a candidate for what you're looking for:

JavaFX/OpenJFX 8 - Rich client application platform for Java

You can install it via:

sudo apt-get install openjfx 

It provides the following JAR files to the OpenJDK installation on Ubuntu systems:

/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/jfxrt.jar /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jfxswt.jar /usr/lib/jvm/java-8-openjdk-amd64/lib/ant-javafx.jar /usr/lib/jvm/java-8-openjdk-amd64/lib/javafx-mx.jar 

If you want to have sources available, for example for debugging, you can additionally install:

sudo apt-get install openjfx-source 


回答2:

I use ubuntu 16.04 and because I already had openJDK installed, this command have solved the problem. Don't forget that JavaFX is part of OpenJDK.

sudo apt-get install openjfx 


标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!