简体   繁体   English

javaFX jar中不包含的库

[英]Libraries not included in javaFX jar

I have built a javaFX application using Maven.The problem is that the javaFX jar file generated from maven, doesn't contain dependencies included. 我已经使用Maven构建了一个javaFX应用程序。问题是从maven生成的javaFX jar文件不包含所包含的依赖项。

I have included the javaFx dependency this way : 我已经通过这种方式包含了javaFx依赖项:

<dependency>
    <groupId>com.oracle</groupId>
    <artifactId>javafx</artifactId>
    <version>8.0.151</version>
    <scope>system</scope>
    <systemPath>C:\Program Files\Java\jdk1.8.0_151\jre\lib\ext\jfxrt.jar</systemPath>
</dependency>

I have also included the javaFx plugin : 我还包括了javaFx插件:

<plugin>
    <groupId>com.zenjava</groupId>
    <artifactId>javafx-maven-plugin</artifactId>
    <version>${javafx.plugin.version}</version>
    <configuration>
        <vendor>Vendor</vendor>
        <mainClass>org.bsh.generator.App</mainClass>
        <jarFileName>CSVGenerator</jarFileName>
    </configuration>
    <executions>
        <execution>
            <id>create-jfxjar</id>
            <phase>package</phase>
            <goals>
                <goal>build-jar</goal>
            </goals>
        </execution>
    </executions>
</plugin>

When I build the jar using goal "build-jar", the jar generated doesn't include other dependencies. 当我使用目标“ build-jar”构建jar时,生成的jar不包含其他依赖项。 Any help please? 有什么帮助吗?

Dependencies scoped as system are not respected, this is intentional. 不尊重范围为system依赖项,这是有意的。 Only provided and runtime scoped dependencies/libraries are respected by the plugin. 插件仅遵守providedruntime范围内的依赖项/库。

Disclaimer: I'm the maintainer of the javafx-maven-plugin. 免责声明:我是javafx-maven-plugin的维护者。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用 Eclipse 中包含的外部库创建 jar? - How to create a jar with external libraries included in Eclipse? IntelliJ Idea-为项目生成JAR:不包含库 - IntelliJ Idea - generating JAR for project: libraries are not included 包含用户库,导出eclipse中的Runnable JAR - Exporting Runnable JAR in eclipse with User Libraries included Maven:如何使用随附的外部库执行可运行的jar(uberjar) - Maven: how to do runable jar (uberjar) with included external libraries Java - Jar 找不到包含的库和主 class - Java - Jar could not find included libraries and main class JavaFX SDK 19 包含 no.dll 使用外部库创建 JAR 的文件 - JavaFX SDK 19 contain no .dll Files to create JAR with external libraries 使用罐子中包含的罐子 - Use a jar included in a jar Netbeans:如何创建包含所有库和资源文件的可执行.jar文件? - Netbeans: how to create an executable .jar file with all libraries and resource files included? 在Eclipse中查看随附的Jar库时,为什么看不到代码? - Why don't I see code when viewing included Jar libraries in Eclipse? 已将jtds ---。jar文件包含到NetBeans上我的Java项目的库中,但仍然出现ClassNotFoundException错误 - Included jtds---.jar file into the libraries of my Java Project on NetBeans, but still having a ClassNotFoundException error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM