fx:deploy with nativeBundles = image 不允许我 运行 来自包含特殊字符的文件夹的可执行文件
fx:deploy with nativeBundles = image does not let me run the executable from folder containing special characters
在 windows 上:我使用 IntelliJ 中的 ant 创建了一个构建,当 运行 来自名为“š”的文件夹时,运行 什么也没有。当我直接 运行 jar 时一切正常。
On mac:可执行的 .app 构建可以是 运行 但是 System.getProperty("user.dir") returns 路径错误(特殊字符是错误),再次如果 jar 是直接 运行,路径没问题。
<fx:application id="SId" name="s" mainClass="packageName"/>
<fx:jar destfile="${artifact.temp.output.mainJar}/S.jar">
<fx:application refid="SId"/>
<fileset dir="${artifact.temp.output.mainJar}" excludes="**/*.jar"/>
<fx:resources>
<fx:fileset dir="${artifact.temp.output.mainJar}" includes="**/*.jar" />
</fx:resources>
<fx:platform javafx="2.1+">
<fx:property name="file.encoding" value="UTF-8"/>
</fx:platform>
<manifest/>
</fx:jar>
<fx:deploy width="600" height="400" updatemode="background" outdir="${artifact.temp.output.mainJar}/deploy" outfile="S" nativeBundles="image">
<fx:application refid="SId"/>
<fx:resources>
<fx:fileset dir="${artifact.temp.output.mainJar}" includes="**/*.jar"/>
</fx:resources>
<fx:info>
<fx:icon href="${basedir}/build_scripts/${iconFileName}" />
</fx:info>
<fx:platform javafx="2.1+">
<fx:property name="file.encoding" value="UTF-8"/>
</fx:platform>
</fx:deploy>
这是一个已知问题,已在 JDK 报告过。
JDK-8133034 launcher crashes if started with non english arguments
JDK-8138642 Generated bundle is not executable when main class contains unicode
由于这是本机可执行文件的普遍问题,而且这两个问题都悬而未决(因为它涉及 C++ 和 unicode 问题),因此没有快速的解决方案。
有趣的部分:我今天正在检查这个作为 javafx-maven-plugin 项目的一些问题清理:https://github.com/javafx-maven-plugin/javafx-maven-plugin/issues/209
在 windows 上:我使用 IntelliJ 中的 ant 创建了一个构建,当 运行 来自名为“š”的文件夹时,运行 什么也没有。当我直接 运行 jar 时一切正常。
On mac:可执行的 .app 构建可以是 运行 但是 System.getProperty("user.dir") returns 路径错误(特殊字符是错误),再次如果 jar 是直接 运行,路径没问题。
<fx:application id="SId" name="s" mainClass="packageName"/>
<fx:jar destfile="${artifact.temp.output.mainJar}/S.jar">
<fx:application refid="SId"/>
<fileset dir="${artifact.temp.output.mainJar}" excludes="**/*.jar"/>
<fx:resources>
<fx:fileset dir="${artifact.temp.output.mainJar}" includes="**/*.jar" />
</fx:resources>
<fx:platform javafx="2.1+">
<fx:property name="file.encoding" value="UTF-8"/>
</fx:platform>
<manifest/>
</fx:jar>
<fx:deploy width="600" height="400" updatemode="background" outdir="${artifact.temp.output.mainJar}/deploy" outfile="S" nativeBundles="image">
<fx:application refid="SId"/>
<fx:resources>
<fx:fileset dir="${artifact.temp.output.mainJar}" includes="**/*.jar"/>
</fx:resources>
<fx:info>
<fx:icon href="${basedir}/build_scripts/${iconFileName}" />
</fx:info>
<fx:platform javafx="2.1+">
<fx:property name="file.encoding" value="UTF-8"/>
</fx:platform>
</fx:deploy>
这是一个已知问题,已在 JDK 报告过。
JDK-8133034 launcher crashes if started with non english arguments
JDK-8138642 Generated bundle is not executable when main class contains unicode
由于这是本机可执行文件的普遍问题,而且这两个问题都悬而未决(因为它涉及 C++ 和 unicode 问题),因此没有快速的解决方案。
有趣的部分:我今天正在检查这个作为 javafx-maven-plugin 项目的一些问题清理:https://github.com/javafx-maven-plugin/javafx-maven-plugin/issues/209