[ S O L V E D ] - Error building New Project using Netbeans and JavaFX (Internal error. Missing resources | Error: -includedt requires the java deployment toolkit)

Can' t build JavaFX Project on NetBeans 8.0.2 (Linux & Windows) better solution.


If you are trying to build a New JavaFX Project with Netbeans and Java JDK 8 or SDK 8, you probably are facing the problem that says:


Internal error. Missing resources [/resources/web-files/javafx-loading-100x100.gif]

nbproject/jfx-impl.xml:3438: The following error occurred while executing this line:

nbproject/jfx-impl.xml:1465: The following error occurred while executing this line:
nbproject/jfx-impl.xml:1465: The following error occurred while executing this line:
nbproject/jfx-impl.xml:2055: Error: -includedt requires the java deployment toolkit, which is not included in this distribution
BUILD FAILED


This error occurs because there is a call to the Java Deployment Toolkit "jdt" directory when building the project, but the Java Deployment Toolkit is not present in the JDK 8.

The solution presented here is very simple: 


  • Open your properties file
  • Find the line that contains javafx.deploy.includeDT=true 
  • Change it to javafx.deploy.includeDT=false
  • Save and build back your project.









Now you are good to go.

I've posted another way to fix this, but this one is cleaner as it is a more modular approach. I'll leave the other posted here.


[ S O L V E D ] - Error: -includedt requires the java deployment toolkit Internal error. Missing resources jfx-impl.xml and ant-javafx.jar

Can' t build JavaFX Project on NetBeans 8.0.2 (Linux & Windows)


There is a bug when building a JavaFX project using Netbeans and JDK8, this was tested on Arch Linux on Netbeans 8.0.2 with JDK8, it just will not compile , or it will show this error on the console.

UPDATED SOLUTION CLICK HERE


Internal error. Missing resources [/resources/web-files/javafx-loading-100x100.gif]
Error: -includedt requires the java deployment toolkit, which is not included in this distribution
BUILD FAILED

Launching <fx:jar> task from /usr/lib/jvm/java-8-openjdk/jre/../lib/ant-javafx.jar
Warning: From JDK7u25 the Codebase manifest attribute should be used to restrict JAR repurposing.
         Please set manifest.custom.codebase property to override the current default non-secure value '*'.
Launching <fx:deploy> task from /usr/lib/jvm/java-8-openjdk/jre/../lib/ant-javafx.jar
Internal error. Missing resources [/resources/web-files/javafx-loading-100x100.gif]
/home/hongo/NetBeansProjects/ConvFX/nbproject/jfx-impl.xml:3438: The following error occurred while executing this line:
/home/hongo/NetBeansProjects/ConvFX/nbproject/jfx-impl.xml:1465: The following error occurred while executing this line:
/home/hongo/NetBeansProjects/ConvFX/nbproject/jfx-impl.xml:3093: The following error occurred while executing this line:
/home/hongo/NetBeansProjects/ConvFX/nbproject/jfx-impl.xml:2055: Error: -includedt requires the java deployment toolkit,
which is not included in this distribution
BUILD FAILED (total time: 2 seconds)


this is my system setup:

jdk8-openjdk (extra/jdk8-openjdk 8.u60-1)
java-openjfx (extra/java-openjfx 8.u45-1)
netbeans (community/netbeans 8.0.2-1)

now, make sure you have jdk8 as default (type):

$ archlinux-java status

Available Java environments:

  java-7-openjdk
  java-8-openjdk (default)



Well, to have it fixed, you have to edit the "jfx-impl.xml" file of your project.

Find the line that declares the variable includeDT and comment it with "//".

// COMMENTED LINE (line 2150 in my case)
// var includeDT = new String(project.getProperty("javafx.deploy.includeDT"));

Copy it with a different initial value like this.

var includeDT = new String(project.getProperty("jfx.deployment.includeDT"));


SAVE AND REBUILD !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
There seems to be a problem with the names, of javafx and jfx, so this will fix the problem.

If it doesn't fix it for you, rollback the changes.






2 ads