1

I downloaded eclipse on my new computer, all components needed etc but javafx isn't working. And I don't understand why because I did the same on my previous computer and it was working fine.

I already trid twice to uninstall and reinstall eclipse, java, jdk, javafx,... But nothing change, same problem.

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.canvas.Canvas;
import javafx.scene.canvas.GraphicsContext;
import javafx.scene.control.Button;
import javafx.scene.control.ToolBar;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.FlowPane;
import javafx.scene.layout.StackPane;
import javafx.scene.paint.Color;
import javafx.scene.text.Font;
import javafx.scene.text.Text;
import javafx.stage.Stage;

// eg : for all those imports i have this error : The import javafx cannot be resolved
Scryper
  • 178
  • 1
  • 14
  • 1
    Which jdk version are you using? Have added the javafx modules in case you're using jdk 11+? – fabian Aug 25 '19 at 14:26
  • 1
    Which _Eclipse_ version are you using? What platform are you on? Windows? Linux? Mac? 32-bit or 64-bit? – Abra Aug 25 '19 at 18:04
  • I'm using jdk 12. I have added tthe javafx module from the marketplace, idk if this is the modules you're talking about. And it's eclipse 2019-06, the latest if i'm not wrong. I'm on windows 64-bits – Scryper Aug 26 '19 at 22:11
  • JavaFX has been removed from jdk11. You can find the solution [here](https://stackoverflow.com/questions/55823133/how-to-use-javafx-in-java12-on-intellij) – Ahamed Safnaj Aug 31 '19 at 07:02
  • Hi, I followed the steps on this [link](https://openjfx.io/openjfx-docs/#install-java). But when I tried to add the jdk as it is said, the eclipse window said that "Target is not a JDK Root. Java executable was not found". So I wonder what havve I done wrong. And I can't use another editor because eclipse is imposed at school. – Scryper Sep 10 '19 at 20:15

0 Answers0