5

I recently started working with JavaFX at the Netbeans IDE. I come along with the Hello World examples as it is not that complicated, but there is one big thing that is totally annoying me:

As within my FXML project, I have to Clean & Build the whole project before changes get applied.

  • Is this normal?
  • May I skip this? Working on my Lenovo Yoga, Clean & Build & Run takes more than a minute! That's way to long for one single changed character.

I'm using:

  • Netbeans version: 7.2.1
  • Project type: JavaFX FXML
  • JDK: 7

Also, I can't select the Properties -> Build -> Compile -> Compile on Save checkbox.

Salah Eddine Taouririt
  • 24,925
  • 20
  • 60
  • 96
Martin Bories
  • 1,067
  • 17
  • 37

1 Answers1

5

Netbeans 7.2.1 does not support Compile on Save for JavaFX projects, so you have to manually recompile the project each time.

One alternative is to create a normal Java project, import the JavaFX JAR (jfxrt.jar IIRC). Compile on Save will be available and you won't have to recompile the whole project every time you make a change (although you should still run a "clean and build" before releasing your project).

When doing that, you might lose a few JavaFx-related features - not completely sure.

assylias
  • 321,522
  • 82
  • 660
  • 783
  • 1
    Thanks for adding the required jar - I've searched for this :D Your solution made it perfectly. I created a normal Java project and added the .jar and now, everything goes way faster^ ^ – Martin Bories Feb 14 '13 at 10:49
  • Nice workaround :) I am using JavaFX 8. So the solution is working without adding jfxrt.jar (because it's a part of JDK 8) – Pioneer Feb 20 '14 at 09:10