-1

I was trying to connect javafx external components but getting this kind of error " Unrecognised option :--module-pathD:\javafx-sdk-11.0.2\lib--add-modules=javafx.controls" So what to do in order to remove this error

ack.imgur.com/RAjYw.jpgstrong text

SedJ601
  • 12,173
  • 3
  • 41
  • 59

1 Answers1

1

As i also faced this problem i am assuming u are using Netbeans IDE

So after JavaFX becoming openjfx it has become a problem but it surely is advantageous, You just need to do a few extra steps

https://openjfx.io/openjfx-docs/#introduction

but there is some problem here so in Project -> Properties -> Libraries

  1. add javafx library to classpath in sources
  2. add javafx library to modulepath in run

and under Project -> Properties -> Run

under vm options add (--add-modules javafx.controls, javafx.fxml)