【问题标题】:launch4j: "The process cannot access the file..."launch4j:“进程无法访问文件...”
【发布时间】:2012-10-09 11:31:53
【问题描述】:

我刚刚升级到 Win 7,现在我的 launch4j 设置不再工作了。

线索?

使用下面的启动文件,我收到以下错误:

 [exec] launch4j: Compiling resources
 [exec] launch4j: Linking
 [exec] launch4j: Wrapping
 [exec] launch4j: H:\Documents\QueryAnalyzerFaker\QueryAnalyzerFaker\.\batchexport.exe (The process cannot access the file because it is being used by another process)
 [exec] launch4j: java.io.FileNotFoundException: H:\Documents\QueryAnalyzerFaker\QueryAnalyzerFaker\.\batchexport.exe (The process cannot access the file because it is being used by another process)

这是启动配置

<launch4jConfig>
  <dontWrapJar>false</dontWrapJar>
  <headerType>console</headerType>
  <jar>.\batchexport.jar</jar>
  <outfile>.\batchexport.exe</outfile>
  <errTitle></errTitle>
  <cmdLine></cmdLine>
  <chdir></chdir>
  <priority>normal</priority>
  <downloadUrl>http://java.com/download</downloadUrl>
  <supportUrl></supportUrl>
  <customProcName>false</customProcName>
  <stayAlive>false</stayAlive>
  <manifest></manifest>
  <icon>.\1326449361_table_money.ico</icon>
  <jre>
    <path>C:\Program Files (x86)\Java\jre6</path>
    <minVersion>1.6.0</minVersion>
    <maxVersion></maxVersion>
    <jdkPreference>jreOnly</jdkPreference>
    <maxHeapSize>1024</maxHeapSize>
  </jre>
</launch4jConfig>

【问题讨论】:

    标签: java executable launch4j


    【解决方案1】:

    此问题似乎是由于目标驱动器(网络驱动器)的同步服务与 launch4j 之间的一些干扰造成的。

    我通过在本地 c: 驱动器上构建来解决它,然后添加一个 Ant 目标以将输出复制到网络驱动器上所需的文件夹。

    【讨论】:

      猜你喜欢
      • 2020-11-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多