not able to rename process/image name using launch4j

微笑、不失礼 提交于 2019-12-10 10:46:09

问题


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.


回答1:


It seems that support for customProcName was dropped.

See: http://sourceforge.net/p/launch4j/bugs/95/



来源:https://stackoverflow.com/questions/28162164/not-able-to-rename-process-image-name-using-launch4j

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!