1. Danno Ferrin
  2. javafx-gradle
  3. Issues
Issue #33 new

Install fails for java 1.8

Anonymous created an issue

When using java 1.8, the install fails. 1) saying I need java 1.7.

I had to change the gradle-javafx-plugin\build.gradle to check for either 1_7 or 1_8.

2) Also, if my java.home was set as the JRE instead of the JDK, the install just doesn't find the ant-javafx.jar. changed the build.gradle to check that the jar exists and give a nice message. // Check for dependency files antJavaFXPath = "${System.properties['java.home']}/../lib/ant-javafx.jar" antJavaFXDir = new File(antJavaFXPath); if ( !antJavaFXDir.exists()) { throw new GradleException("Couldn't find file at " + antJavaFXPath + " set JAVA_HOME to JDK.") }

This was then fixed by setting my JAVA_HOME env var to my JDK, not my JRE home.

Comments (2)

  1. MartinAnderssonDotCom

    Finally managed to make an install setting the property like so:

    gradle install -Djava.home="C:\Program Files\Java\jdk1.8.0_40\bin"
    

    Note that the path now point to the bin directory which is not the normal case.

  2. Log in to comment