launch4j:“进程无法访问文件......”

时间:2012-10-09 11:31:54

标签: java executable launch4j

我刚刚升级到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>

1 个答案:

答案 0 :(得分:0)

问题似乎是由目标驱动器(网络驱动器)和launch4j的同步服务之间的某些干扰引起的。

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