【问题标题】:How to create an executable installer for JavaFX aplication using Maven and Inno Setup in Netbeans 11如何在 Netbeans 11 中使用 Maven 和 Inno Setup 为 JavaFX 应用程序创建可执行安装程序
【发布时间】:2020-01-05 12:28:36
【问题描述】:

在 netbeans 8.2 中,我可以使用原生包创建安装程序。 我尝试在 Netbeans 11 中使用 maven 和 javafx-maven-plugin 做同样的事情。

我使用 install jfx:native 作为构建操作。

这是我的 pom.xml 文件 http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 ClienteIntegradorMaven 1.0-快照 UTF-8 12 12 ClienteIntegradorMaven

    </properties>
    <dependencies>
        <!-- https://mvnrepository.com/artifact/com.microsoft.sqlserver/mssql-jdbc -->
        <dependency>
            <groupId>com.microsoft.sqlserver</groupId>
            <artifactId>mssql-jdbc</artifactId>
            <version>7.4.1.jre12</version>
        </dependency>

        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-controls</artifactId>
            <version>12.0.2</version>
        </dependency>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-fxml</artifactId>
            <version>12.0.2</version>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.12</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
            <version>2.11.2</version>
            <type>jar</type>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <release>12</release>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.openjfx</groupId>
                <artifactId>javafx-maven-plugin</artifactId>
                <version>0.0.3</version>
                <configuration>
                    <release>12</release>
                    <jlinkImageName>hellofx</jlinkImageName>
                    <launcher>launcher</launcher>
                    <mainClass>clienteintegrador4.ClienteIntegrador4</mainClass>
                    <executable>C:\Program Files\Java\jdk-12.0.2\bin\java</executable>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

【问题讨论】:

    标签: java maven javafx netbeans inno-setup


    【解决方案1】:

    您始终可以从批处理文件 (.bat) 编译 Inno Setup 脚本。

    只需在批处理文件中使用以下语法:

    path\to\ISCC.exe path\to\your\file.iss
    

    查看详情:如何使用command-line compiler in Inno Setup编译脚本。

    所以您只需要从 Maven/Netbeans/xml 调用批处理文件。

    附:我没有使用 Maven 或 Netbeans 的经验(但我是 Inno Setup 专家),所以我无法粘贴确切的解决方案。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-07-29
      • 2011-01-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多