Using JavaFX in Eclipse 4

I am trying to determine whether JavaFX can be used as the basis for UI development in the context of an eclipse 4 RCP application.  I am just learning about eclipse 4 and what they've done differently from eclipse 3.x - specifically the concepts of products and features, application model and the newer mechanism for defining the major eclipse RCP application infrastructure.  I went through a tutorial on e4 (Eclipse 4 RCP - Tutorial) and that gave me a pretty good overview and introduction to e4.  The tutorial does not go into what would be involved to integrate JavaFX with eclipse 4, though (not that I would expect it to).
So, I've taken the sample app that I'd built as part of doing the tutorial and set about seeing if I could implement a JavaFX UI and incorporate it as one of the parts of the small app.  I haven't had much luck so far.  Unfortunately, I'm blundering around modifying the various eclipse 4 "components" (i.e. the "product", "feature" and "plug-in" files) without really any clue as to what I should be doing.
Here are some details of my environment and what I've done so far.
Windows 7
Eclipse Kepler (4.3.1)
Java 1.7
e(fx)clipse has been installed
The sample application built in the tutorial involves:
Plug-in project with some simple classes that define the "parts", handlers and other stuff needed by e4.
The e4 "feature" project which is basically just a feature.xml which lists the plug-in.
The e4 "product" project which has just the .product file, using the feature.
Prior to my attempts to add JavaFX to the mix, this little application works perfectly.  I created an FXCanvas class (containing nothing at this point) that I attempted to embed in one of the parts to represent its UI.  Then, when I tried to run the "product" I'd get various errors or exceptions depending upon the things I tried.  The problems that occurred unfortunately weren't clear to me as to what is wrong.  I tried adding the javafx plugin to various elements, with varying resulting failures.  At this point I'm at a total loss as to what to do to make this work.
I was going to try to add some screen shots, but I am prevented from doing so.  There is also no way to add attachments.

Thanks a lot for your response.
Can you elaborate on it please?
I am new to flex so not aware of all the terminologies and process.

Similar Messages

  • Fatal errors using JavaFX ChoiceBox, Tooltip, Popup in Eclipse (RCP) View

    I'm using JavaFX within an Eclipse RCP application. Any JavaFX popup (ChoiceBox, Tooltip, etc..) within an eclipse view causes a fatal exception to occur when clicking on the popup. The popups do appear, but clicking on them causes the fatal error.
    I created a standalone JavaFX application to confirm that the Popups work fine in that environment. They do.
    I also created a standalone SWT-based application (outside of an RCP) that embeds the FXCanvas within an SWT shell and the problem doesn't occur there either.
    But when the Combo is contained in an FXCanvas within and RCP view, the fatal exception occurs.
    Has anybody else seen this behavior?
    I tried it with JavaFX 2.0.2, 2.1 b17, 2.1 b19 (all 32bit)
    I'm using JRE 6.0_30-b12 (32bit) on Windows 7 (64bit)
    My RCP target platform is based on eclipse 3.6 (galileo).
    Thanks!

    The problem is described in http://javafx-jira.kenai.com/browse/RT-20883. e(fx)clipse 0.0.14 (http://tomsondev.bestsolution.at/2012/05/29/efxclipse-0-0-14-released/) which I've just released fixes the problem. Unfortunately it does not work with 3.6 because I'm using OSGi API only available > 3.7.0

  • A RCP Application using javafx deployed by java web start,in jre8u25 run have problem.

    a RCP Application using javafx deployed by java web start,in jre8u20 can use jre7run the applicat,but in jre8u25 use jre7run application have problem.
    in jre8u20 use jre7 run the application can run success.
    but in jre8u20 the control print:
    java.lang.UnsupportedClassVersionError: com/sun/javafx/runtime/VersionInfo : Unsupported major.minor version 52.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at com.sun.deploy.config.JfxRuntime.runtimeForPath(Unknown Source)
    at com.sun.deploy.config.JREInfo.<init>(Unknown Source)
    at com.sun.deploy.config.JREInfo.setInstalledJREList(Unknown Source)
    at com.sun.deploy.config.ClientConfig.storeInstalledJREs(Unknown Source)
    at com.sun.javaws.Main.launchApp(Unknown Source)
    at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
    at com.sun.javaws.Main.access$000(Unknown Source)
    at com.sun.javaws.Main$1.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    the reason (i think) is that the application will use javafx's com.sum.javafx.runtime.VersionInfo,i use e(fx)clipse load the javafx runtime.in jre8u20,the web start use jre7's class.in jre8u25,the web start use jre8's class.
    so i use jre7 run the application get this result.
    how could i solve this problem?

    Hi,
    I have created client stubs for a webservice using axis wsdl2java tool. When I try calling these stubbed methods from JUnit tests, they are working fine but when I try to execute the jar (it is a swing) I get the following exception:
    Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/rpc/Service
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at com.Gudds.SeCURE.MainUI.<init>(MainUI.java:76)
    at com.Gudds.SeCURE.Main.Start(Main.java:62)
    at org.owasp.webscarab.WebScarab.main(WebScarab.java:34)
    I have put the jaxrpc.jar in the classpath and I suppose this jar has the java.xml.rpc.service class but I donot understand why it fails while executing the jar but works fine from the eclipse IDe. Plase help me.
    Regrdas,
    Kundan

  • How do i use multiple threads( very much real time), using JavaFX?

    I'm creating an application, using JavaFX because one can create awesome GUI using JavaFX. I need to know how to create real time multiple threads using javafx.
    JavaFX doesn't support creation of multiple threads, but i think there is another way of doing it. I need it work in real time as my application works with an hardware (wacom intous 3 tablet), and i need mutiple threads to get all the parameters from the stylus of the tablet simultaneously...
    any code which will help me out or explaination on how to go about this is appreciated...
    Help required quickly...

    See example at
    [http://jfxstudio.wordpress.com/2009/06/09/asynchronous-operations-in-javafx/|http://jfxstudio.wordpress.com/2009/06/09/asynchronous-operations-in-javafx/]

  • How to create a muli line text area using JavaFx

    Hi all,
    Since the preview SDK does not contain TextArea any more, I am wondering how to create a muli line text area using JavaFX. The behaviour of this text area/field should be somehow similar to JTextArea in Swing or StyledTextWidget in SWT.
    Does JavaFX have any support for this? What would be a sensible approach to create such a widget?
    Thanks for your suggestions,
    br michael

    This is a pretty old thread (I know I came across this while searching for something similar recently), but I figured I'd throw this out there in case other people might find this useful. As I write this, JavaFX's latest version is 1.3... which may have added the needed functionality since the last post.
    You can now create a multi-line text area using a TextBox and by specifying the nubmer of lines and setting the "multiline" value to true. It may not offer all of the same functionality as JTextArea, but it did the job for what I needed... newlines by pressing enter, scrollbar if text surpasses height, etc.
    Here's a simple example:
    Group {
       content: [
          TextBox {
             text: "This is a multi-line textbox"
             lines: 10  // <-- this may/may not be necessary depending on your situation. Default is 5.
             multiline: true
    }Edited by: loeschg on Jul 29, 2010 2:59 PM

  • If I Use JavaFX to Create a Game Do I Have to Release the Source Code?

    Hello,
    I've asked this question before, but I just thought I would try it again now
    that version 1.0 is out.
    If I Use JavaFX to Create a Game Do I Have to Release the Source Code?
    Thanx in advance.

    Could you please point me to a resource describing "the JavaFX Runtime license"? I'm trying to find answers to the following questions:
    1. I'd like to use Scenario.jar from the JavaFX project in a desktop app that is not using Webstart and is not an applet. Will I be able to ship the jar with my software?
    2. Can JavaFX applications be distributed as commercial software in the absence of a Web connection?
    What's not clear to me is which is the real license for Scenario.jar (as shipped with JavaFX). Is it the one in openjfx-compiler's trunk, or the one that comes with the JavaFX SDK (which is very vague about redistribution)?

  • How to compile Java files using Ant in Eclipse

    Hi All ,
    I would like to compile all Java files using Ant in Eclipse.Since am very new to Ant and Eclipse can someone help me to create a build.xml file and let me know how to compile all the java files.
    For ex , I have placed my java files inside the path C:\HEC\Terab.Initially the Terab folder holds 7 jar files which i had decompiled using JD compiler and placed the unzipped 7 folders (which contains the java files ).Now i have imported the HEC project into Eclipse using New ->Project ->Java Project.after importig it throwed me an error saying missing jar files.again i copied the jar files and placed inside Terab folder with other 7 folder.
    Now How i can compile the java files and convert in to class files.Then after compiling the files i will again need to jar all the 7 folder.
    Please tell me the steps i need to follow.How to write an build.xml file ? where i should keep it ? only one build.xml file is enough or should i write 7 build.xml file for each folder ? Please help me out...
    Thanks & Regards
    Kar1983

    put it another way, what I am trying to do is to compile David Brackeen's ch 18 code from his book. The java sourse files can be downloaded here:
    http://www.brackeen.com/javagamebook/
    my question is that how would I complie all of these file so that I can get the program in ch18src\src\com\brackeen\javagamebook\test\ to run?

  • Using NetBeans and Eclipse to drag and drop forms, controls etc

    Hi, can you use NetBeans and Eclipse to drag and drop like say with C# in MS Visual Studio ?
    like forms and listboxes, textboxes etc ??

    And [this is a good place to start|http://java.sun.com/docs/books/tutorial/uiswing/index.html]
    db

  • Looking for working example using javafx.builders.HttpRequestBuilder

    Hi,
    Is there any working example using javafx.builders.HttpRequestBuilder and javafx.io.http.HttpRequest to communicate with application server?
    Thanks in advance.
    LD

    Hi,
    Is there any working example using javafx.builders.HttpRequestBuilder and javafx.io.http.HttpRequest to communicate with application server?
    Thanks in advance.
    LD

  • Using javafx and awt together in MAC

    I have read blogs about not using SWT and AWT libraries together in MAC systems. So, are their any constraints for JAVAFX and AWT as well ?
    Please refer to this link.
    I am having a similar case of writing an image to disk and I am using javafx, the line doesn't seem to work on my mac.
    Message was edited by: abhinay_agarwal

    The link you posted on SWT/AWT integration is irrelevant to JavaFX/AWT integration.
    To learn abount JavaFX/Swing integration, see the Oracle tutorial trail:
    JavaFX for Swing Developers: About This Tutorial | JavaFX 2 Tutorials and Documentation
    As Swing is based on AWT, the tutorial trail is equally applicable whether you are integrating JavaFX with only AWT or with the full Swing toolkit.
    In my opinion, there is little reason to integrate JavaFX with just the AWT toolkit as there is little of value that AWT would provide that JavaFX does not already provide.
    JavaFX integrates fine with ImageIO to write files to disk, Oracle provide a tutorial for that (see the "Creating a Snapshot" section):
    Using the Image Ops API | JavaFX 2 Tutorials and Documentation
    //Take snapshot of the scene
    WritableImage writableImage = scene.snapshot(null);
    // Write snapshot to file system as a .png image
    File outFile = new File("imageops-snapshot.png");
    try {
      ImageIO.write(
        SwingFXUtils.fromFXImage(writableImage, null),
        "png",
        outFile
    } catch (IOException ex) {
      System.out.println(ex.getMessage());

  • How to use JavaFX in LAN, No internet

    Hi, I need help, My PC works in LAN, not chance to link internet.
    so I can not link dtfx.js and dl.javafx.com, I can not use JavaFX in browser.
    Thanks.

    See this forum thread:
    JavaFX

  • How to invoke widgets using Javafx

    Hi,
    Can anyone please say how we can invoke widgets from a javafx code?
    Please help.
    Any help in this regard will be well appreciated with points.
    Warm Regards,
    Anees

    If you follow this link , you can see the example of a widget.
    [http://eco.netvibes.com/export/blog/230491/google-news|http://eco.netvibes.com/export/blog/230491/google-news]
    We can use this widget in an html, by just inserting the code given there in our html page.
    Instead of an html page, I want to use this code and display it in a container as shown in the examples in the link [https://docs.google.com/Doc?id=dfzrknk_33gvv8z2f4&hl=en|https://docs.google.com/Doc?id=dfzrknk_33gvv8z2f4&hl=en]
    I need to do this using javafx.
    This is my exact requirement.
    If I am not cllear with any portion of my question, please say.
    Regards,
    Anees

  • Accessing resource files inside Jar using Fat Jar Eclipse plugin

    Hi,
    I want to develop single JAR file that uses a set of other JAR libraries. I am using Fat Jar Eclipse plugin. It works fine. However, I have problem to access resources files (i.e. rdf file) using relative path from my classes. Is there any idea how can I pack, set classpath and use relative path in order to make it works.
    Thanks
    Zoran

    I have solved this problem. The problem was in a way how I have trying to access it. It should be like:
    URL fileURL = this.getClass().getResource("resource/myFile.rdf");
    Zoran

  • Running a JUnit test case using Ant in Eclipse

    If I have a "JUnit", how can I run it using "Ant" in Eclipse?
    Thanks.

    Right-click on the ant build script and select "Run as ant build". But why bother? Eclipse has its own JUnit runners

  • JAX WS using MAVEN in ECLIPSE

    Helllo everyone,
    I want to create a jax ws webservice using maven project in eclipse. Could anyone let me know if there is any tutorial to that? I would need step by step tutorial as am new to both maven and web services.

    828091 wrote:
    I would need step by step tutorial as am new to both maven and web services.In that case you need two decent books. Especially in the case of Maven that is highly recommended as it has a very steep learning curve. I wrote an article about getting started with Maven and about using Maven in Eclipse that you could use as a base for your research:
    http://entjavastuff.blogspot.com/2010/06/maven2-copy-pastable-template.html
    http://entjavastuff.blogspot.com/2011/10/using-maven-in-eclipse.html
    But I stress that point: use it as a base for your research; there is no real step by step guide that will make you understand, it will only show you what to do in a very specific case which will not match what you want to do. As for your web services question, that's a simple Google query. "maven jax-ws". That should point you to the Maven plugin documentation.

Maybe you are looking for