Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to build scene builder from openjfx sources

I'm trying to build JFX scene builder from openjfx sources but I'm can't find a valid howto or clear documentation, I've already read the official openjfx instruction that are not for scene builder but for the whole sdk, so I've installed mercurial and gradle but i have some question:

1) Can i build only the scene builder without building the whole SDK ?

2) I've tried to run gradle from apps/scenebuilder folder it run successfully but where to find the generated artifact ? I was expecting a target folder with a jar inside but nothing was generated.

3) I've googled around and found that it should be possible to download only the scene builder sources from mercurial but i can't find any valid mercurial repo.

any help will be highly appreciated, many thanks.

like image 871
Fabio Frumento Avatar asked Jan 08 '23 16:01

Fabio Frumento


2 Answers

Download Scene Builder Source from here:

https://bitbucket.org/gluon-oss/scenebuilder/downloads

In e(fx)clipse create a new JavaFX Project "SceneBuilder".

From the downloaded source copy the com packages (from both subfolders "java" and "resources" to the src folder.

In e(fx)clipse click File -> Export -> Java -> Runnable JAR with com/oracle/javafx/scenebuilder/app/SceneBuilderApp.java as start app and create a runnable jar.

There's nothing else to it.


In case you don't want to get SceneBuilder from gluon, you can get it from here:

http://hg.openjdk.java.net/openjfx/8u40/rt/file/eb264cdc5828/apps/scenebuilder

Same steps apply. Just copy the contents of the src folder of SceneBuilderApp and SceneBuilderKit to a new JavaFX project, let it compile, create a runnable jar and be done with it. It works flawless without problems.

like image 156
Roland Avatar answered Jan 17 '23 15:01

Roland


Ok,

It turned out that there's no need to build the whole SDK from openjfx to build the scene builder app I've solved this way:

1) Installed latest ant from apache official site

2) Gone into the apps/scenebuilder folder

3) Run ant -Dplatforms.JDK_1.8.home=/Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/ jar

This worked for me, the result of the build is in the "dist" folder and to run the just built scene builder i had to use

/Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home//bin/java -cp /Users/fabiofrumento/openjfx/apps/scenebuilder/SceneBuilderKit/dist/SceneBuilderKit.jar:/Users/fabiofrumento/openjfx/apps/scenebuilder/SceneBuilderApp/dist/SceneBuilderApp.jar com.oracle.javafx.scenebuilder.app.SceneBuilderApp

Obviously the paths are to be customized for you installation.

like image 38
Fabio Frumento Avatar answered Jan 17 '23 15:01

Fabio Frumento