IDEA 开发javafx: error: java:package javafx.application does not exist

1)jdk使用1.8, 1.7中未包含javafx相关内容。

2)确保classpath中加入了javafx包路径。

在“file” --> "project structure" -->"Platform Settings" 下的 "SDKs"选项中,添加jdk

正确加载后可以看到:

若是经过上述步骤,问题仍没有解决,在ubuntu 16.04下,添加JavaFx库。

命令为:

sudo apt-get install openjfx

原文地址:https://www.cnblogs.com/rohens-hbg/p/11641360.html