score:1

i'll detail my install and setup process in case anyone else has troubles:

setup for javafx11, jdk11, and eclipse on ubuntu 18.04

install openjdk11 and javafx11 sdk

sudo apt install openjdk-11-jdk openjfx

be sure to select the sdk version of javafx!

javafx

check java version reads out the correct jdk version

java -version

the output should look like this:

openjdk version "11.0.3" 2019-04-16
openjdk runtime environment (build 11.0.3+7-ubuntu-1ubuntu218.04.1)
openjdk 64-bit server vm (build 11.0.3+7-ubuntu-1ubuntu218.04.1, mixed mode, sharing)

install the newest eclipse 2019-03 (4.11)

download link

when creating a project:

  1. create a new java project
    • be sure the jdk used for the project is jdk11
    • don't create module.info
  2. right click your project folder and click "properties". go to the "libraries" tab and left click "module path". on the right, select "add library" and choose "user library"
    • name it javafx
    • include all of the .jar files in /path/to/javafx/lib
      • don't include anyother file type!
  3. add the newely created libary to the projects module path
  4. in run configuration, found in the run taskbar, select the "arguments" tab and add this to vm arguments:
    • --module-path /usr/lib/jvm/javafx-sdk-11.0.2/lib --add-modules javafx.controls,javafx.fxml
    • be sure the path to your javafx is correct!

Related Query

More Query from same tag