user3717596
user3717596

Reputation: 311

Error opening scene builder

I'm making a program with Javafx Eclipse and I get an error when I open the program with the Scene Builder

This is the error:

Opening the file with SceneBuilder failed. 
Try setting the absolute path to scenebuilder in your preferences

Upvotes: 29

Views: 74400

Answers (11)

Pawara Siriwardhane
Pawara Siriwardhane

Reputation: 2055

For Windows users:

Although the question is asked 07 years ago, still the problem persists. Recently I get the same error in the question. I am a Windows user and I get my error fixed by a combination of methods as follows. I will explain the steps very simply that could be understood by anybody. Because this problem is often faced by newbies to JavaFX and Eclipse IDE.

  1. First download and install the JavaFXSceneBuilder. Remember to copy the path where it will be installed. (mine: C:\Program Files (x86)\Oracle\JavaFX Scene Builder 2.0)
    Link: Click here
    (Sometimes this link will not work when new updates are released. Then simply google search for 'JavaFXScenBuilder download'. Then download the latest version that suits your OS)
  2. Next go to the Menu tab in Eclipse.
  3. Go to Window -> Preferences
  4. In the search box, Search 'JavaFX' and click on it. Browse JavaFXSceneBuilder
  5. Then, click on the 'Browse' button in front of the 'SceneBuilder executable'.
  6. Go to the path initially copied in step 01, and find the 'JavaFX Scene Builder 2.0.exe' file (yours version may be different if install a later version). Select .exe file
  7. Select it. Then click on 'Apply'. Next 'Apply and close'. Apply and Close
  8. Now go back to the .fxml file and try open with 'SceneBuilder'.

Hope this answer may help for the new users of eclipse like me...!

Upvotes: 0

Daniyal Tariq
Daniyal Tariq

Reputation: 50

This could as easy as you have missed installing the Scene Builder for the JavaFx. By installing only the JavaFx from the eclipse market is not enough you have to manuall follow that above link of scene builder and download the softare and after installation just check again it will definatelly work now!

This thing worked in my Case :)

Upvotes: 0

user2367924
user2367924

Reputation: 75

I was getting the same error: SceneBuilderError

The way I solved it is by me going to (on Mac) Eclipse/Preferences/JavaFX JavaFX Preferences SceneBuilder executable, click on "Browse" then select the application SceneBuilder. that should fix it. Apply and close. Now try it again and it should open it up. Hope this helps.

Upvotes: 1

Sadi Mahmud
Sadi Mahmud

Reputation: 101

Those of you who are using MacOS ( in my case ), Go to JavaFx from preferences then browse to application folder and select scene builder.

Doing other ways wont open the exact file you are trying to edit (It may make a new file which will be untitled and you have to save it manually on the project directory). Also right clicking the fxml file, you wont be able to use the option (open with scenebuilder).

Upvotes: 0

c0der
c0der

Reputation: 18812

None of the previous answers solve the described problem for me.
This answer did.

Upvotes: 2

Olawoye Omotayo
Olawoye Omotayo

Reputation: 29

set the path to SceneBuilder app; to do this on mac os

  1. go to eclipse in your menu bar and click on preferences or press the keyboard shortcut "cmd" + ",".
  2. then click on JavaFX
  3. click on browse to select the path to sceneBuilder executable (which should be in your application folder if you are running mac os.

Upvotes: 2

Utsav Jha
Utsav Jha

Reputation: 376

Try downloading javafx scene builder from the link:

http://www.oracle.com/technetwork/java/javafxscenebuilder-1x-archive-2199384.html

Then integrate it with your ide by Window>preferences and add a file adssociation as an external program to it.

Upvotes: 1

Java FX Scene Builder is not part of the Java SDK nor the e(fx)clipse plugin. It's an external tool that you have to download and install separatly. Java FX Scene Builder is part of the Java Archive, if link doesn't work, you'll probably find a link to the Archive at the bottom of the Java Download page, and find it from there.

After installation, the cleanest way is to set the path under Window > Preferences > JavaFX

(on Windows, browse and select C:\Program Files (x86)\Oracle\JavaFX Scene Builder 2.0\JavaFX Scene Builder 2.0.exe as executable).

This will render the context menu option "Open with SceneBuilder" operational on *.fxml files.

Unfortunately this doesn't add SceneBuilder as an internal editor or external program, so if you want the file associations, you'll still have to browse for your external program int the file association dialog under Window > Preferences > General > Editors > File Associations. You can choose *.fxml, and add an associated editor, choosing "External programs" and browsing for the above mentionned executable.

Upvotes: 10

CrazedCoder
CrazedCoder

Reputation: 304

Make sure you are running the latest version of Eclipse. I've tested this with Luna 4.4 as I had the same issue.

Install the latest version of JavaFX Scene Builder. You can find version 2.0 here: http://www.oracle.com/technetwork/java/javase/downloads/sb2download-2177776.html

Then set your absolute path to the JavaFX Scene Builder in your preferences:

  1. Click on the menu path: Window->Preferences->General->Editors->File Association
  2. Select *.fxml in the "File types:" list on the right hand side
  3. Click the "Add..." button for the "Associated editors:" list.
  4. Click the "External programs" in the "Editor Selection" menu.
  5. Click the "External programs" radio button.
  6. Click the "Browse..." button and Navigate to this path: "C:\Program Files (x86)\Oracle\JavaFX Scene Builder 2.0". Select the file: JavaFX Scene Builder 2.0.exe
  7. Click the "Open" button.

In the Editor Selection window select the "OK" button.

In the Associated editors: list, select "JavaFX Scene Builder 2.0" and click the "Default" button.

Now you should be good to go!

Upvotes: 19

Glavin001
Glavin001

Reputation: 1356

  1. I downloaded SceneBuilder 8.0 from http://gluonhq.com/products/downloads/ because Oracle only provides the source code.

  2. Configure Eclipse to use SceneBuilder executable. Go to Preferences -> JavaFX -> set SceneBuilder executable. Mine was C:\Users\USERNAME\AppData\Local\SceneBuilder\SceneBuilder.exe

Upvotes: 13

Ashraf Sarhan
Ashraf Sarhan

Reputation: 1707

Set the SceneBuilder executable path in the JavaFX of your Eclipse IDE as the following:

  1. Window -> Preferences -> JavaFX
  2. Click "Browse" and navigate to the JavaFXSceneBuilder2.0 bash file (linux) or JavaFXSceneBuilder2.0.exe (windows) like the following:

    Windows: C:\Program Files (x86)\Oracle\JavaFX Scene Builder 2.0

    Linux: /opt/JavaFXSceneBuilder2.0/JavaFXSceneBuilder2.0

Upvotes: 45

Related Questions