javafx package javafx.embed.swt not in java8u5


Question

I'd like to use FXCanvas from the package javafx.embed.swt as shown in this example: http://docs.oracle.com/javafx/2/swt_interoperability/jfxpub-swt_interoperability.htm# But all I can find is javafx.embed.swing package. javafx.embed.swt is simply not existant. What am I doing wrong ? I use java8u5. Is there a special download nessessary or is there a different version of java that contains that package ??

thanks for any hint! Thorsten

1
5
5/24/2014 5:59:17 AM

The JavaFX SWT embedding classes are in the jre/lib directory.

$ java -version
java version "1.8.0_20-ea"
Java(TM) SE Runtime Environment (build 1.8.0_20-ea-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b14, mixed mode)

$ pwd
/Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/Home/jre/lib

$ ls jfxswt.jar 
jfxswt.jar

$ jar tvf jfxswt.jar | grep FXCanvas.class
18702 Mon May 12 21:52:14 PDT 2014 javafx/embed/swt/FXCanvas.class

I've never used SWT in JavaFX so I don't really know anything about how to use it. If you would like more assistance, post to the e(fx)clipse forums for advice - they are experts on such matters.

Also refer to the version of the documentation which matches the version of Java you are using:

2
5/24/2014 6:31:34 AM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon