I am knew to javafx. I downloaded the samples and tried to run them from NetBeans 7.4 IDE, but the build fails with following error message:
ant -f C:\\Users\\Juraj\\Dropbox\\FH-FFM\\WS_2013\\Java\\javafx-samples-2.2.45\\src\\Ensemble jfxsa-run
C:\Users\Juraj\Dropbox\FH-FFM\WS_2013\Java\javafx-samples-2.2.45\src\Ensemble\nbproject\build-impl.xml:88: The J2SE Platform is not correctly set up.
Your active platform is: default_platform, but the corresponding property "platforms.default_platform.home" is not found in the project's properties files.
Either open the project in the IDE and setup the Platform with the same name or add it manually.
For example like this:
ant -Duser.properties.file=<path_to_property_file> jar (where you put the property "platforms.default_platform.home" in a .properties file)
or ant -Dplatforms.default_platform.home=<path_to_JDK_home> jar (where no properties file is used)
BUILD FAILED (total time: 0 seconds)
I reinstalled everything with default settings (NetBeans with SDK etc). When I create javafx project manually following tutorial, it builds just fine. I was able to build self-contained aplication following this guide too.
I found only this relevant topic and tried to use it as a guide but without much success. Could somebody help me to fix it?
Thank you.
Edit:
I inserted this line:
platforms.default_platform.home
into .properties file. Now I get this build error message:
ant -f C:\\Users\\Juraj\\Documents\\NetBeansProjects\\javafx-samples-2.2.45\\src\\Ensemble jfxsa-run
C:\Users\Juraj\Documents\NetBeansProjects\javafx-samples-2.2.45\src\Ensemble\nbproject\build-impl.xml:460: Execute failed:
java.io.IOException: Cannot run program "\bin\java" (in directory "C:\Users\Juraj\Documents\NetBeansProjects\javafx-samples-2.2.45\src\Ensemble"): CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
at java.lang.Runtime.exec(Runtime.java:617)
at org.apache.tools.ant.taskdefs.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:41)
at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:428)
at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:442)
at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:628)
at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:669)
at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:495)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor328.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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:283)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:541)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:385)
at java.lang.ProcessImpl.start(ProcessImpl.java:136)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
... 22 more
BUILD FAILED (total time: 0 seconds)
Is it looking for java.exe?