0

So, im trying to run JavaFX and ND4J together using JavaFX. I don't see why there should be any problem with this, as they are just separate dependencies. However, I tried the following:

-Running JavaFX:compile works fine
-Running JavaFX:run throws the following error

Can't extract module name from nd4j-native-1.0.0-beta5.jar: nd4j.native: Invalid module name: 'native' is not a Java identifier
Can't extract module name from nd4j-native-1.0.0-beta5-windows-x86_64.jar: nd4j.native: Invalid module name: 'native' is not a Java identifier
Can't extract module name from nd4j-native-1.0.0-beta5-ios-x86_64.jar: nd4j.native: Invalid module name: 'native' is not a Java identifier
Can't extract module name from nd4j-native-1.0.0-beta5-android-arm.jar: nd4j.native: Invalid module name: 'native' is not a Java identifier
Can't extract module name from nd4j-native-1.0.0-beta5-linux-x86_64.jar: nd4j.native: Invalid module name: 'native' is not a Java identifier
Can't extract module name from nd4j-native-1.0.0-beta5-linux-armhf.jar: nd4j.native: Invalid module name: 'native' is not a Java identifier
Can't extract module name from nd4j-native-1.0.0-beta5-android-x86_64.jar: nd4j.native: Invalid module name: 'native' is not a Java identifier
Can't extract module name from nd4j-native-1.0.0-beta5-android-x86.jar: nd4j.native: Invalid module name: 'native' is not a Java identifier
Can't extract module name from nd4j-native-1.0.0-beta5-ios-arm64.jar: nd4j.native: Invalid module name: 'native' is not a Java identifier
Can't extract module name from nd4j-native-1.0.0-beta5-android-arm64.jar: nd4j.native: Invalid module name: 'native' is not a Java identifier
Can't extract module name from nd4j-native-1.0.0-beta5-macosx-x86_64.jar: nd4j.native: Invalid module name: 'native' is not a Java identifier
Can't extract module name from nd4j-native-api-1.0.0-beta5.jar: nd4j.native.api: Invalid module name: 'native' is not a Java identifier
Can't extract module name from nd4j-native-platform-1.0.0-beta5.jar: nd4j.native.platform: Invalid module name: 'native' is not a Java identifier
Can't extract module name from nd4j-native-1.0.0-beta5-linux-ppc64le.jar: nd4j.native: Invalid module name: 'native' is not a Java identifier
Some dependencies encountered issues while attempting to be resolved as modules and will not be included in the classpath; you can change this behavior via the  'includePathExceptionsInClasspath' configuration parameter.

This is my pom.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>TEST</groupId>
    <artifactId>test-main</artifactId>
    <version>0.0.1-SNAPSHOT</version>

    <dependencies>
        <!-- https://mvnrepository.com/artifact/org.nd4j/nd4j-api -->
        <dependency>
            <groupId>org.nd4j</groupId>
            <artifactId>nd4j-native-platform</artifactId>
            <version>1.0.0-beta5</version>
        </dependency>

        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-controls</artifactId>
            <version>11</version>
        </dependency>

        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-fxml</artifactId>
            <version>11</version>
        </dependency>

        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-graphics</artifactId>
            <version>11</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.0</version>
                <configuration>
                    <source>11</source>
                    <target>11</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.openjfx</groupId>
                <artifactId>javafx-maven-plugin</artifactId>
                <version>0.0.3</version>

                <configuration>
                    <mainClass>src.main.java.sample/main</mainClass>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

Using Java 11 and IntelliJ.

I'm not really sure why this is happening, as it compiles fine. Any help would be much appreciated, thanks!

Xtra Slo
  • 11
  • 1
  • 2
  • you followed this ans? https://stackoverflow.com/questions/57085661/why-cant-i-compile-maven-with-openjfx-and-deeplearning4j – Nigel Savage Dec 23 '19 at 20:30
  • Yes, from what I understood I just needed to use JavaFX Maven plugin version 0.0.3 which I am doing. Is there anything else I am missing? – Xtra Slo Dec 23 '19 at 21:18
  • from that ans, thinks like 'Can't extract module name from nd4j-native-1.0.0-beta5.jar' are just warnings yes?, if yes I dont see any errors in the trace, from the ans we can see its an underlying bug in the framework, follw the issue here https://github.com/openjfx/javafx-maven-plugin/issues/37 – Nigel Savage Dec 23 '19 at 21:37
  • I'm sorry, but there seem to be no comments other than the question with that git issue? Even though they are apparently just warnings according to that thread, the execution fails with the message: "Command execution failed." – Xtra Slo Dec 23 '19 at 21:47
  • I am not sure what issue is, first thing I would try would be to add the source, target and release in the configuration element you can see this in the readme under "javafx:compile options" https://github.com/openjfx/javafx-maven-plugin – Nigel Savage Dec 23 '19 at 22:17

0 Answers0