java - 无法使用 launch4j 重命名进程/图像名称

标签 java xml jakarta-ee process launch4j

我正在使用 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 的支持。

参见:http://sourceforge.net/p/launch4j/bugs/95/

关于java - 无法使用 launch4j 重命名进程/图像名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28162164/

相关文章:

java - 对如何有效地形成此 SQL 查询感到困惑

java - if 或语句 xml 和 java 控制台输出

java - XSLT 传输失败,因为 Weblogic 找不到位于 rt.jar 中的类

java - 应用程序重定向到 JBoss EAP 7.0 的默认页面

java - "The value of the local variable is not used."

java - 在列表中获取 java.lang.UnsupportedOperationException

java - 获取 spring bean 的新实例

java - 从 log4j2.xml 配置中引用 java 类变量

java - 使用 JDOM API 读取 xml 文件

angularjs - 将数据从 Controller 传递到 $uibModal Controller angularjs