Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Netbeans & JavaFX - Clean and build on each run?

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.

like image 504
Martin Bories Avatar asked Feb 14 '13 10:02

Martin Bories


1 Answers

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.

like image 197
assylias Avatar answered Oct 12 '22 18:10

assylias