2

I've been trying to use import javafx.embed.swing.SwingNode because I want to use SwingNode in my project, but the error "cannot be resolved" comes up.

I have a JavaFX SDK in libraries, so I don't know where the problem is.

Does anyone have any idea what it can be?

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
user3508537
  • 41
  • 3
  • 4

1 Answers1

1
  1. Use Oracle Java 8 (it places JavaFX classes on the default classpath).
  2. Don't manually place JavaFX libraries in your classpath.

See Maven project with JavaFX (with jar file in `lib`) for more information (you probably aren't using maven but much of the background info and reasoning applies equally to your question).

Community
  • 1
  • 1
jewelsea
  • 150,031
  • 14
  • 366
  • 406