0

I'm trying to deploy my javafx project as .exe in e(fx)clipse with the build.fxbuild. After creating all the folders, the consoles tells me the following:

BUILD FAILED
C:\Users\XXX\Build\build.xml:53: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "C:\Program Files\Java\jre8"

A simple .jar file would also do the job but I can't make this work either. I'm getting several exceptions when I try to start my .jar ( I think this might be because It trys to run it on jre7, not on jre8 as it's supposed to ). However, launching my program in eclipse works. Anyone has an Idea how to fix this? Thank you.

Philip Feldmann
  • 7,887
  • 6
  • 41
  • 65
  • The error says it all. Your `JAVA_HOME` is currently pointing to a `JRE` and not a `JDK`. The code works in eclipse because eclipse has its own compiler. – ItachiUchiha Mar 29 '15 at 16:07
  • Thank you. Where can I change this path and how do I find the jdk? – Philip Feldmann Mar 29 '15 at 16:21
  • Can you add details about your environment? – ItachiUchiha Mar 29 '15 at 17:01
  • [This thread](http://stackoverflow.com/questions/2619584/how-to-set-java-home-on-windows-7) might help you out. – ItachiUchiha Mar 29 '15 at 17:26
  • Thank you. I now got the sdk setup but it gives me this error now: `build.xml:84: Problem: failed to create task or type javafx:com.sun.javafx.tools.ant:resources`. I've changed nothing in the build.xml, it's auto generated. Even if I delete the line, I'll get the same error for the next one. – Philip Feldmann Mar 29 '15 at 20:21
  • The problem sounds similar to [this question](http://stackoverflow.com/questions/10753949/cannot-build-javafx-2-1-0-sample-application-dataapp-failed-to-create-task-o). If it doesn't help, add the stacktrace to the question for better debugging help. – ItachiUchiha Mar 29 '15 at 21:18
  • If I add this it tells me `Target -init-javafx doesn't exist in this project`. I've literally no idea how this can cause so much trouble. I've followed the code makery tutorial on deployment but I'm still stuck on this. – Philip Feldmann Mar 30 '15 at 20:20

0 Answers0