【发布时间】:2015-01-27 02:18:11
【问题描述】:
我正在使用 Launch4j 重命名我的 Java 进程以进行唯一标识。我已在所需的 xml 文件中将节点 customProcName 设置为 true。但我仍然将 javaw.exe 作为 Windows 任务管理器中的进程/图像名称。下面是我用来启动应用程序的 xml 代码。请推荐
<?xml version="1.0" encoding="UTF-8"?>
<launch4jConfig>
<customProcName>true</customProcName>
<dontWrapJar>false</dontWrapJar>
<headerType>gui</headerType>
<jar>D:\MQLink_Installers_Files\TestLaunch_fat.jar</jar>
<outfile>D:\MQLink_Installers_Files\MyMain.exe</outfile>
<errTitle></errTitle>
<cmdLine></cmdLine>
<chdir>.</chdir>
<priority>normal</priority>
<downloadUrl>http://java.com/download</downloadUrl>
<supportUrl></supportUrl>
<stayAlive>false</stayAlive>
<restartOnCrash>false</restartOnCrash>
<manifest></manifest>
<icon></icon>
<classPath>
<mainClass>MyMain</mainClass>
</classPath>
<jre>
<path></path>
<bundledJre64Bit>false</bundledJre64Bit>
<bundledJreAsFallback>false</bundledJreAsFallback>
<minVersion>1.6.0</minVersion>
<maxVersion></maxVersion>
<jdkPreference>preferJre</jdkPreference>
<runtimeBits>64/32</runtimeBits>
</jre>
<versionInfo>
<fileVersion>1.0.0.0</fileVersion>
<txtFileVersion>1.0</txtFileVersion>
<fileDescription>MyMain</fileDescription>
<copyright>Copyright (c) 2011 Fsp</copyright>
<productVersion>1.0.0.0</productVersion>
<txtProductVersion>1.0</txtProductVersion>
<productName>MyMain</productName>
<companyName>Fsp</companyName>
<internalName>MyMain</internalName>
<originalFilename>MyMain.exe</originalFilename>
</versionInfo>
</launch4jConfig>
编辑: 问题是我手动将 true 设置为 xml 文件。当我从 launch4j 向导保存并创建新版本时,xml 文件会被覆盖。不确定如何从 launch4j 向导设置 customProcName。
【问题讨论】:
-
您是否尝试在 IDE 中使用 Maven 插件?所以你不必使用向导。
-
对我来说,它仅在我将标题类型设置为“控制台”时才有效。如果有人找到适用于标题“GUI”的解决方案,请告诉我
标签: java xml jakarta-ee process launch4j