JavaFX NoClassDefFoundError


I have installed JDK 8 a bit ago, to use the WebView, but I got an error. The error was this:

Exception in thread "main" java.lang.NoClassDefFoundError: 

I don't know why the Swing isn't embed into JavaFX for JDK 8, but anyone know how to fix this?

[ java -version output ]

java version "1.8.0_11" Java(TM) SE Runtime Environment (build 1.8.0_11-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.11-b03, mixed mode)

Question is solved, I just needed to check in the Run Configuration that the right JRE was used.

Another question. It said the "source isn't attached" (I think the jfxrt.jar is not there where its supposed to be.) Any suggestions?

8/16/2014 5:58:56 AM

My guess is that you think you are using Oracle Java 8, but you aren't really and are using Java 7 instead or you are using an OpenJDK Linux version which does not have JavaFX. Run java -version and edit your question to include the output.

8/15/2014 4:29:54 PM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow