我正在使用 Launch4j 重命名我的 Java 进程以进行唯一标识。我已在所需的 xml 文件中将节点 customProcName 设置为 true。但我仍然在 Windows 任务管理器中将 javaw.exe 作为进程/图像名称。下面是我用来启动应用程序的 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。
最佳答案
似乎已放弃对 customProcName 的支持。
关于java - 无法使用 launch4j 重命名进程/图像名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28162164/