Adam Bien's Weblog
Setting JavaFX 2 Runtime At Start (And Solving "Unable to read ../rt/" Problem)
If you run "java -jar killer-app.jar" on a machine where JavaFX SDK was installed with a simple "unzip" (like a Mac), you will get the following error:
Unable to read ../rt/lib/jfxrt.jar
Unable to read ../../../../rt/lib/jfxrt.jar
Unable to read ../../sdk/rt/lib/jfxrt.jar
Unable to read ../../../artifacts/sdk/rt/lib/jfxrt.jar
Because the Java FX launcher does not know where to find the runtime, it falls back to the default location.To solve this problem, just pass the system property:
javafx.runtime.path with the JavaFX SDK location at start:
java -Djavafx.runtime.path=[THE UNZIPPED JAVA FX SDK]/rt -jar killer-app.jar
Posted at 05:07AM Feb 06, 2012 by Adam Bien in RIA / Java FX | Comments[0] | Views/Hits: 933
*NEW* Workshop: "Real World Java EE 6/7 Bootstrap" and book: Real World Java EE Night Hacks--Dissecting the Business Tier Tweet Follow @AdamBien
JavaFX 2.0 CSS Reference
All JavaFX 2 components can be styled with CSS 3. The CSS JavaFX 2 reference is available here: http://docs.oracle.com/javafx/2.0/api/javafx/scene/doc-files/cssref.html. To activate your custom CSS you only have to add a resource containing the CSS styles to the javafx.scene.Scene:
Scene scene = ...
scene.getStylesheets().add(this.getClass().getResource("javafxrocks.css").toExternalForm());
stage.setScene(scene);
stage.show();
Posted at 09:35AM Jan 13, 2012 by Adam Bien in RIA / Java FX | Comments[1] | Views/Hits: 1948
*NEW* Workshop: "Real World Java EE 6/7 Bootstrap" and book: Real World Java EE Night Hacks--Dissecting the Business Tier Tweet Follow @AdamBien
How To Compile Java FX 2 Applications With Maven 3
Java FX 2 is Java. To build a Java FX application you only need an additional JAR: jfxrt.jar which contains the Java FX UI classes. The JAR comes with Java FX SDK, but is not included in the public maven repository. You can point to the Java FX SDK installation with Maven's system scope dependency:
<project>
...
<dependencies>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>javafx</artifactId>
<version>2.0</version>
<systemPath>${fx.home}/rt/lib/jfxrt.jar</systemPath>
<scope>system</scope>
</dependency>
</dependencies>
</project>
The resolution of the ${fx.home} variable ensures the pom.xml independency on user-specific settings:
<settings>
...
<profiles>
<profile>
<id>javafx</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<fx.home>[PATH]/javafx-sdk2.1.0-beta/</fx.home>
</properties>
</profile>
</profiles>
</settings>
Posted at 09:01AM Dec 21, 2011 by Adam Bien in RIA / Java FX | Comments[0] | Views/Hits: 2689
*NEW* Workshop: "Real World Java EE 6/7 Bootstrap" and book: Real World Java EE Night Hacks--Dissecting the Business Tier Tweet Follow @AdamBien
Java FX 2 …Comes With Java SE 7 Update 2
Java FX 2 is shipped now with Java SE. This update makes Java FX 2 a default choice for RIAs on the Java platform.
You can download Java SE 7 Update 2 from here.Posted at 09:49AM Dec 19, 2011 by Adam Bien in RIA / Java FX | Comments[4] | Views/Hits: 1987
*NEW* Workshop: "Real World Java EE 6/7 Bootstrap" and book: Real World Java EE Night Hacks--Dissecting the Business Tier Tweet Follow @AdamBien
Swing Looks ...Great!: NetBeans 7 (IDE + RCP) With New Synthetica L&F
Synthetica V2.13 and SyntheticaAddons V1.5 L&Fs for Swing are released. See also NetBeans RCP with Synthetica L&F.
Some screenshots with NetBeans 7 IDE with Synthetica L&F:



Posted at 10:50AM Jul 18, 2011 by Adam Bien in RIA / Java FX | Comments[2] | Views/Hits: 2695
*NEW* Workshop: "Real World Java EE 6/7 Bootstrap" and book: Real World Java EE Night Hacks--Dissecting the Business Tier Tweet Follow @AdamBien
Swing Looks ...Great! - New Theme For Synthetica
The BlackEye look and feel was already introduced. Synthetica comes with a new theme called "Classy":


WebStart Demo works perfectly on MacOS X. Its not a trick - its Swing :-).
Posted at 02:29PM Mar 10, 2011 by Adam Bien in RIA / Java FX | Comments[0] | Views/Hits: 5139
*NEW* Workshop: "Real World Java EE 6/7 Bootstrap" and book: Real World Java EE Night Hacks--Dissecting the Business Tier Tweet Follow @AdamBien
Hello JavaFX 2! - A TableView Component
A table control was missed in JavaFX 1.3. JavaFX 2 comes with a new table component:
import javafx.application.Application;
import javafx.application.Launcher;
import javafx.collections.FXCollections;
import javafx.collections.Sequence;
import javafx.scene.Group;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.control.table.TableColumn;
import javafx.scene.control.table.TableView;
import javafx.scene.control.table.model.SequenceTableModel;
import javafx.stage.Stage;
public class Main extends Application {
@Override
public void start() {
Stage stage = new Stage();
stage.setTitle("Hello Table");
final Group root = new Group();
Scene scene = new Scene(root);
stage.setScene(scene);
Sequence
Java FX 2 application can be compiled having jfxrt.jar in the classpath and launched like any other Java application:
java -cp javafx-sdk2.0-ea/rt/jfxrt.jar com.abien.table.MainEven in the case of the preview the startup performance is <1 sec and significantly faster, than 1.X version.
This post is based on Java FX 2 Early Access - the API and runtime can change any time.
Sees official JavaFX roadmap for more details.
Posted at 10:27AM Feb 21, 2011 by Adam Bien in RIA / Java FX | Comments[20] | Views/Hits: 3147
*NEW* Workshop: "Real World Java EE 6/7 Bootstrap" and book: Real World Java EE Night Hacks--Dissecting the Business Tier Tweet Follow @AdamBien
Hello JavaFX 2! - Back To Java
In contrary to JavaFX 1.X, JavaFX 2 is pure Java:
package com.abien.hello;
import javafx.application.Application;
import javafx.application.Launcher;
import javafx.collections.Sequence;
import javafx.scene.Group;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.stage.Stage;
public class Main extends Application{
@Override public void start() {
Stage stage = new Stage();
stage.setTitle("Hello Java FX");
stage.setResizable(false);
Group root = new Group();
Scene scene = new Scene(root,80,20);
stage.setScene(scene);
Sequence children = root.getChildren();
children.add(new Label("Hello Java FX 2"));
stage.setVisible(true);
}
public static void main(String[] args) {
Launcher.launch(Main.class, args);
}
}
Java FX 2 application can be compiled having jfxrt.jar in the classpath and launched like any other Java application: java -cp javafx-sdk2.0-ea/rt/jfxrt.jar com.abien.hello.MainEven in the case of the preview the startup performance is <1 sec and significantly faster, than 1.X version.
This post is based on Java FX 2 Early Access - the API and runtime can change any time.
Sees official JavaFX roadmap for more details.
Posted at 10:30AM Feb 14, 2011 by Adam Bien in RIA / Java FX | Comments[57] | Views/Hits: 23442
*NEW* Workshop: "Real World Java EE 6/7 Bootstrap" and book: Real World Java EE Night Hacks--Dissecting the Business Tier Tweet Follow @AdamBien
Java FX 2.0 - The Installation, Doc and Launch Experience - A Smoke Test
The installation of Java FX 2.0 is as simple as it can get - unzip of the Early Access was sufficient.
First observations:- Startup of the provided examples is extremely fast < 1 sec and orders of magnitude faster than previous Java FX 1.3 samples
- A double click on a Jar-file is sufficient to launch a Java FX app - no further configuration was necessary
- The doc comes in fresh design and is compelling
- Java FX 2.0 is extremely easy to integrate with Java projects - the inclusion of a single Jar is sufficient
- The runtime is far smaller, than expected
Posted at 04:42PM Feb 04, 2011 by Adam Bien in RIA / Java FX | Comments[18] | Views/Hits: 10705
*NEW* Workshop: "Real World Java EE 6/7 Bootstrap" and book: Real World Java EE Night Hacks--Dissecting the Business Tier Tweet Follow @AdamBien
Java FX CSS Reference Available
The appearance of UI-Controls in Java FX can be either configured programmatically, or with CSS. See this comprehensive CSS reference. Hopefully it will be distributed with the official SDK doc in the next release...
Its a kind of "Convention Over Configuration" again :-).
Posted at 11:11AM Jun 25, 2010 by Adam Bien in RIA / Java FX | Comments[0] | Views/Hits: 3382
*NEW* Workshop: "Real World Java EE 6/7 Bootstrap" and book: Real World Java EE Night Hacks--Dissecting the Business Tier Tweet Follow @AdamBien


