wood burning stoves
The moose likes JavaFX and the fly likes Pro JavaFX and Netbeans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » JavaFX
Bookmark "Pro JavaFX and Netbeans" Watch "Pro JavaFX and Netbeans" New topic

Pro JavaFX and Netbeans

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15302

How much of the book is "click this in Netbeans" and how much is IDE agnostic?

GenRocket - Experts at Building Test Data
Dean Iverson

Joined: Aug 30, 2009
Posts: 20

Chapter 1 contains a section that describes how to set up, run, and deploy projects from NetBeans. There is also a section that explains compiling and running from the command line. That's it. The rest of the book is about writing code, not IDE how-tos.

For convenience, all of the samples are distributed as NetBeans projects.

Dean Iverson
book - blog - twitter
Tina Ma
Ranch Hand

Joined: Nov 29, 2007
Posts: 198
Are you trying to use the JavaFX plugin for Eclipse ganymede? If yes, please let me know if you were successful, then I can load you with error messages and questions and ask for advice...

SCJP 1.4, SCWCD 1.4
Dean Iverson

Joined: Aug 30, 2009
Posts: 20

Sorry. I switched from Eclipse to Netbeans about 3 years ago for some NetBeans RCP work, and have rarely touched Eclipse since then unfortunately.
Bob Noyb

Joined: Aug 27, 2013
Posts: 1
I just tried the Pro JavaFX ch01 command line example
ch01HelloDir>javac -d . -cp "C:\Program Files\Java\jre\jfxrt.jar" HelloEarthRiseMain.java

and I get 14 errors starting with
pacakage javafx.builders does not exist

Is the jfxrt jar not enough?
John Damien Smith
Ranch Hand

Joined: Jan 26, 2012
Posts: 213
This is a really old thread Bob.
Probably best to start new threads for recent questions.

Pro JavaFX is outdated and refers to the JavaFX 1.x script language which is no longer distributed by Oracle.

There is a new book for JavaFX 2+ => Pro JavaFX 2. The book was written by most of the same authors as the original.

To compile a JavaFX program from the command line for JavaFX 2.x using only javac, you need to manually place jfxrt.jar on the classpath.
You not need to manually place jfxrt.jar on the classpath for Java 8 - which makes Java 8 more convenient to work with.

There are some instructions on compiling JavaFX from the command line in the answer to the StackOverflow question Compile JavaFX manually.

In your question, you say:
pacakage javafx.builders does not exist

package is spelt wrong, so check your code for typos.

Builders will be deprecated in the version of JavaFX (Java 8), so use of them is no longer recommended.
Builders will still continue to work in Java 8, but may be removed from the distribution for Java 9.

In your question, you supply a classpath to jfxrt.jar as "C:\Program Files\Java\jre\jfxrt.jar".
By default there is no jfxrt.jar in that location on any standard JavaFX install.
For Java JRE 7 64 bit (update 6 and later) installed on windows, jfxrt.jar is located at "C:\Program Files\Java\jre7\lib\jfxrt.jar".
You can check in the filesystem using Windows Explorer to see where jfxrt.jar is located for your installation.
Have you checked out Aspose?
subject: Pro JavaFX and Netbeans
It's not a secret anymore!