JavaFX + Maven + NetBeans + Patience = ?

Observations from using Maven to manage a JavaFX project in NetBeans 6.8:

  1. Place all JavaFX source files in src\main\javafx. Otherwise, NetBeans complains about not being able to find com.sun.javafx.runtime.FXBase.
  2. Place all Java source files in src\main\java, just like a normal Java project.
  3. Maven JavaFX project folder structure

  4. Ignore the error message in JavaFX files about being in a non-JavaFX project. If the standard project definition lets you mix Java and JavaFX source files, why not in a Maven project?
  5. Bogus file warning

  6. Fix Imports will not fix imports for your own classes. You must manually type in the import statement, and resist the urge to use the command later as it will remove your own imported classes.
  7. Unused used import

  8. Even if you do manage to keep your imports, you still have to contend with complaints about variable types.
  9. Bad variable type

And yet, this project will still compile, despite the warnings.

Advertisement

One Response to JavaFX + Maven + NetBeans + Patience = ?

  1. [...] When I got to the point of implementing a horizontal split, I thought I would use an enum to represent the divider orientation, instead of using static integers. Unfortunately, you have to use a Java enum, as there is no such beast in JavaFX. This is where I ran into issues with Maven, as described in an earlier post. [...]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.