I am using the Launch4j to rename my Java process for unique identification. I have set the node customProcName to true in the required xml file. But I am still getting javaw.exe as the process/Image name in the windows task manager. Below is my xml code which I am using to launch the application. Please suggest
<?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>
EDIT: The problem is that I am manually setting the true into the xml file. And when I save & create a new build from launch4j wizard, the xml file gets overridden. Not sure how to set the customProcName from launch4j wizard.
It seems that support for customProcName was dropped.
来源:https://stackoverflow.com/questions/28162164/not-able-to-rename-process-image-name-using-launch4j