1

I've recently upgraded from JDK 10 to JDK 11 and installed the latest Eclipse IDE for Java developers, at verison 2018-12 (4.10.0).

However for some reason my old Java FX projects (that worked with JDK 10) are not working. It says that the classes cannot be resolved. The image below shows the red lines where the affected classes lie.

enter image description here

I've tried a number of things such as making sure the build path of the project is correct:

enter image description here

I've also made sure the eclipse javafx plugin is installed:

enter image description here

I've also made sure my JDK 11 install has had the correct envrioment variables set, but none of the above has had any affect.

I've also looked at similar questions related to this but none of there soloutions worked.

Any help would be appreiated.

SneakyShrike
  • 723
  • 1
  • 10
  • 31
  • JavaFX is not part of JDK11 - you need to stay on JDK10 or move to OpenJFX. – assylias Jan 18 '19 at 14:50
  • 2
    JavaFX is no longer part of the JDK, and the e(fx)clipse plugin doesn't add it either. See other answers like [this](https://stackoverflow.com/questions/52144931/how-to-add-javafx-runtime-to-eclipse-in-java-11) one – José Pereda Jan 18 '19 at 14:51
  • @JoséPereda I've tried following those steps but I can't seem to point eclipse to my install of javafx like he says here: "Create a User Library: Eclipse -> Window -> Preferences -> Java -> Build Path -> User Libraries -> New. Name it JavaFX11 and include the jars under the lib folder from JavaFX 11-ea". – SneakyShrike Jan 18 '19 at 15:26
  • Just refer to your JavaFX 11.0.2 install – José Pereda Jan 18 '19 at 15:31
  • @JoséPereda I added the javafx lib files into the build path and the errors have gone but when i run the program it now says 'Error: JavaFX runtime components are missing, and are required to run this application' – SneakyShrike Jan 18 '19 at 15:33
  • Follow the steps of that answer or go to the referred official documentation, everything is well detailed – José Pereda Jan 18 '19 at 15:34
  • @JoséPereda Well I don't know what to say, I followed the steps but it just keeps coming up with an error message every time i compile. I didn't realise it was your answer orignally but i'm sort of stuck. – SneakyShrike Jan 18 '19 at 15:43
  • 2
    Please follow are by step this https://openjfx.io/openjfx-docs/#IDE-Eclipse – José Pereda Jan 18 '19 at 15:51
  • @JoséPereda Oh silly me I didn't see that on the website for some reason. I think my frustation made me blind. It all works now after following those steps, thanks for your patience. Also do you think java 11 will ever come with javafx? Because that's a lot of hassle to setup each time. – SneakyShrike Jan 18 '19 at 16:07
  • @GR412 Nope, not gonna happen. – assylias Jan 18 '19 at 16:15

0 Answers0