0

After creation standard Gluon project and trying to open .fxml file I see an error enter image description here

As I understand Gluon will provide opening .fxml files by SceneBulder as commercial support. Where I can buy this support-feature? p.s. I use last versions of SceneBuilder and gluon plugin for NetBeans (for 19.03.2016)

Sergey Orlov
  • 491
  • 5
  • 16

2 Answers2

1

In order to open the fxml files created with the Gluon Mobile plugin, the first thing you need to do is adding the Charm jar to Scene Builder.

In case you haven't done it already, these are the steps:

Importing charm-2.1.0.jar

For that, click on the Dependencies folder, open Compile for Main folder, and you will find the charm-2.1.0.jar. Right click on it and select Properties.

project dependencies

You will see the full path of that jar. Click the browse button, select and copy (Ctrl+C) the path on the dialog:

Jar Path

Now open Scene Builder 8.1.1, and click on the small 'engine' button on the Library pane (right below the menus), and select Add Jar/FXML file:

Add jar

Now paste the content of your clipboard, with the full path of the jar.

The jar will be imported, and you will see all the custom controls available in Gluon Mobile, like the View control. Click on Import Components.

custom controls

Opening FXML files from Scene Builder

Now you will be able to open from Scene Builder the fxml files from your project.

views

Opening FXML files from NetBeans

Assuming that you have added Scene Builder path to NetBeans, if you try to open the fxml file from NetBeans, you may get an exception if it includes custom controls (like View).

Currently there's an open issue and a pending pull request that solves it. Once it is approved and merged it will be available in the next release of Scene Builder.

In the meantime, if you can't wait, you can clone the project, apply the proposed patch yourself, build the project and replace the dist.jar in your current Scene Builder installation, usually at this path C:\Users\<user>\AppData\Local\SceneBuilder\app\dist.jar.

If you still have problems, please have a look at these links:

or report them here as well.

José Pereda
  • 44,311
  • 7
  • 104
  • 132
0

In Scenebuilder 8.2 this seems to be broken. If you import com.gluonhq:charm:4.0.1 and com.gluonhq:charm-glisten:4.0.1 there is no View in the import mentioned; and the (gluon) fxml cannot be loaded :-(

rwijngaa
  • 192
  • 3
  • 13