0

I have installed openjfx with JDK8 on Ubuntu. I am adding openjfx modules with --module-path flag. But module-path flag is missing in Java 8. I have tried using classpath but that doesn't seem to work. javac --module-path /usr/share/openjfx/lib --add-modules=javafx.base,javafx.controls,javafx.fxml,javafx.graphics,javafx.media,javafx.swing,javafx.web .java

I tried to use classpath: javac -classpath /usr/share/openjfx/lib

But I get errors like: cannot find javaFX.application.* cannot find javaFX.scene etc.

Is it possible to run openjfx with java 8? --module-path and --add-modules work fine, is there an alternative for them in java 8?

--add-modules doesn't work with classpath.

Fitohe
  • 13
  • 1
  • 3
  • Options such as `--module-path` and `--add-modules` do not exist in Java 8. The _Java Platform Module System_ was added in Java 9. If you're actually running Java 8, then your command should be crashing with an "unrecognized option" error. As for using OpenJFX with Java 8, that depends on what version of OpenJFX you're using. OpenJFX 8 can be used with Java 8. But OpenJFX 11 to 18 require _at least_ Java 11. – Slaw Aug 14 '22 at 06:02
  • And I believe `-classpath` needs to be pointing directly to the JAR files, not just the common parent directory (unlike when using `--module-path`). – Slaw Aug 14 '22 at 06:03

0 Answers0