Add jfxrt.jar to the classpath when using Java 7, or (preferably, but a little more complex, use the
Oracle recommended JavaFX packaging tools for your development).
For Java 8 early access builds (
http://jdk8.java.net/download.html), addition of jfxrt.jar to the classpath is not necessary as JavaFX is already on the default classpath for that Java version.
As you are using maven, you may want to use a
JavaFX maven plugin, which (I believe) takes care of classpath (and other) development issues for you.
For an example of using a JavaFX maven plugin, see
From Zero to JavaFX in 5 Minutes.
For an example, of command line development see:
http://stackoverflow.com/questions/10888367/compiling-and-running-with-javafx-2-1
Paste the following code and save it:
Compile and run it: