Eclipse RCP e4 and JavaFX: minimal working example

  1. Install Java 8

  2. Install JavaFX Tooling and Runtime for Eclipse and OSGi

  3. Make sure Java8 is selected as the default JRE. installed_jres

  4. Create a new Eclipse 4 application project. new_e4_app_project

  5. Make sure you select Create sample content (parts, menu etc.). e4_sample_content

  6. The e4 application. e4-javafx
  7. Create a new class, FXMLController, with the following content: fxmlcontroller
  8. Create a new file, fxml/FXML.fxml, with the following content: fxml
  9. Create a new file, styles/fxml.css, with the following content: fxml-css
  10. Open SamplePart.java and replace its content with the following:
  11. Open META-INF/MANIFEST.MF and add org.eclipse.fx.javafx and org.eclipse.fx.osgi.util to Required Plug-ins. javafx_plugin_requirement
    e4fx_manifest.mf
  12. Open e4-javafx.product and add the following to the VM Arguments:
    -Dosgi.framework.extensions=org.eclipse.fx.osgi
    
    vm_launching
  13. Launch the application: launch_e4_fx_product
    running2