3

I'm attempting to get started using JavaFX, but when I try to compile Hello World, JavaFX Style, I get the error "package javafx does not exist". I uninstalled JDK (7) and JRE and installed JDK 8, which was suggested to help others with similar issues, however this did not help. Then I tried manually adding "C:\Program Files\Java\jdk1.8.0_05\jre\lib\ext\jfxrt.jar" to the classpath environment variable . Despite all this, I still get the same error.

My classpath, in case it helps: .;C:\Program Files (x86)\QuickTime\QTSystem\QTJava.zip;C:\Program Files\Java\jdk1.8.0_05\jre\lib\ext\jfxrt.jar;

LilSweden
  • 625
  • 1
  • 7
  • 15
  • How are you compiling your java program? Are you using an IDE ? Why does your classpath has `QTJava.zip` ? – ItachiUchiha Jun 22 '14 at 17:01
  • I'm compiling via cmd with "javac gui.java". I'm not sure why QTJava.zip is there, but I did not add it :/ – LilSweden Jun 22 '14 at 17:12
  • I guess these are your `PATH` entries in Environment Variables. Please follow http://stackoverflow.com/a/9436341/1759128 – ItachiUchiha Jun 22 '14 at 17:22
  • I'm using java 8, but typing javac gui.java does not work for me. Should I follow the instructions for java 7 instead? Otherwise that answer is not useful to me. Sorry I did not check the answer before I posted my original comment requesting you to mark as duplicate. – LilSweden Jun 22 '14 at 17:28
  • 1
    possible duplicate of [Compile code using JavaFX 2.0 (using command line)](http://stackoverflow.com/questions/9436219/compile-code-using-javafx-2-0-using-command-line) – ItachiUchiha Jun 22 '14 at 17:29
  • Done ! Welcome to SO. Always search for questions before posting one in SO :) – ItachiUchiha Jun 22 '14 at 17:30

0 Answers0