July 7, 2016

How to Run Java FXML on Ubuntu

Running Java FXML requires Java Web Start. If not installed you get this

JNLP failed : Error: -includedt requires the java deployment toolkit, which is not included in this distribution
com.sun.javafx.tools.packager.PackagerException: Error: -includedt requires the java deployment toolkit, which is not included in this distribution
 at com.oracle.tools.packager.jnlp.JNLPBundler.execute(JNLPBundler.java:493)
 at com.sun.javafx.tools.packager.PackagerLib.generateNativeBundles(PackagerLib.java:352)
 at com.sun.javafx.tools.packager.PackagerLib.generateDeploymentPackages(PackagerLib.java:318)
 at com.sun.javafx.tools.ant.DeployFXTask.execute(DeployFXTask.java:286)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:497)
 at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
 at org.apache.tools.ant.Task.perform(Task.java:348)
 at jdk.nashorn.internal.scripts.Script$9$\^eval\_.:program(<eval>:405)
 at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:640)
 at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:228)
 at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)
 at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:446)
 at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:403)
 at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:399)
 at jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:155)
 at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:497)
 at org.apache.tools.ant.util.ReflectUtil.invoke(ReflectUtil.java:108)
 at org.apache.tools.ant.util.ReflectWrapper.invoke(ReflectWrapper.java:81)
 at org.apache.tools.ant.util.optional.JavaxScriptRunner.evaluateScript(JavaxScriptRunner.java:103)
 at org.apache.tools.ant.util.optional.JavaxScriptRunner.executeScript(JavaxScriptRunner.java:67)
 at org.apache.tools.ant.taskdefs.optional.Script.execute(Script.java:52)
 at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
 at sun.reflect.GeneratedMethodAccessor46.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:497)
 at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
 at org.apache.tools.ant.Task.perform(Task.java:348)
 at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
 at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
 at sun.reflect.GeneratedMethodAccessor46.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:497)
 at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
 at org.apache.tools.ant.Task.perform(Task.java:348)
 at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:396)
 at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
 at sun.reflect.GeneratedMethodAccessor46.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:497)
 at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
 at org.apache.tools.ant.Task.perform(Task.java:348)
 at org.apache.tools.ant.Target.execute(Target.java:435)
 at org.apache.tools.ant.Target.performTasks(Target.java:456)
 at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
 at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
 at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
 at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:441)
 at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
 at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
 at sun.reflect.GeneratedMethodAccessor46.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:497)
 at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
 at org.apache.tools.ant.Task.perform(Task.java:348)
 at org.apache.tools.ant.Target.execute(Target.java:435)
 at org.apache.tools.ant.Target.performTasks(Target.java:456)
 at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
 at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
 at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
 at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
 at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:286)
 at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:555)
 at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
/home/buildmaster/NetBeansProjects/MoleculeSampleApp/nbproject/jfx-impl.xml:1465: The following error occurred while executing this line:
/home/buildmaster/NetBeansProjects/MoleculeSampleApp/nbproject/jfx-impl.xml:3093: The following error occurred while executing this line:
/home/buildmaster/NetBeansProjects/MoleculeSampleApp/nbproject/jfx-impl.xml:2055: Error: Bundler "WebStart JNLP Bundler" (jnlp) failed to produce a bundle.
BUILD FAILED (total time: 7 seconds)

To install Java Web Start on Ubuntu 16.04 LTS

$ sudo apt-get install icedtea*

How to Run Java FXML on Ubuntu

Running Java FXML requires Java Web Start. If not installed you get this

To install Java Web Start on Ubuntu 16.04 LTS

July 6, 2016

How to Install Java FX on Ubuntu

The default JRE on Ubuntu is OpenJDK, but it does not come bundled with Java FX, since Oracle has closed Java FX and do not allow it to be freely distributed. But there is an open option, namely OpenJFX.

To install OpenJFX on Ubuntu Ubuntu 16.04 LTS.

$ sudo apt-get install openjfx openjfx-source libopenjfx-java libopenjfx-java-doc libopenjfx-jni