Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/ant/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Netbeans 脚本在不同的系统上有不同的行为_Netbeans_Ant - Fatal编程技术网

Netbeans 脚本在不同的系统上有不同的行为

Netbeans 脚本在不同的系统上有不同的行为,netbeans,ant,Netbeans,Ant,我为我的netbeans java项目生成了默认的ant脚本,它在我的windows桌面上运行得非常好,我得到了包含lib文件夹的dist文件夹。 现在我在debian系统上有了相同的文件和文件夹,并运行ant,但是dist文件夹在lib文件夹中从不包含依赖项jar 项目中的设置等都是正确的 我在Debian6.0.3中使用Ant1.8.0,在WindowsXP中使用Ant1.8.2 下面是由netbeans生成的ant脚本 有什么问题吗?根据我在Windows环境下开发,然后在Linux上部署

我为我的netbeans java项目生成了默认的ant脚本,它在我的windows桌面上运行得非常好,我得到了包含lib文件夹的dist文件夹。
现在我在debian系统上有了相同的文件和文件夹,并运行ant,但是dist文件夹在lib文件夹中从不包含依赖项jar

项目中的设置等都是正确的

我在Debian6.0.3中使用Ant1.8.0,在WindowsXP中使用Ant1.8.2

下面是由netbeans生成的ant脚本


有什么问题吗?

根据我在Windows环境下开发,然后在Linux上部署的经验,可能有一些问题:

  • 路径的使用:总是使用/Temp/application/alpha而不是 而C:\Temp\application\alpha-正斜杠/相当于 双反斜杠\在Windows上,在Linux上兼容
  • 检查Linux上的Java版本是否与Windows Java版本相同,并且是32/64
  • 确保Linux Java版本中包含任何第三方JAR,例如安全加密升级等
  • 您的全局路径设置正确。尤其是在运行cron作业时
  • 尽可能尝试使用java环境变量。例如,在引用临时文件夹时,请使用${java.io.tmpdir}
  • 我试图用很少的信息回答你的问题

    您能提供您的ant脚本吗?

    我发现了“错误”:

    我比较了日志文件,发现了问题:

    -使用库包执行jar:
    已跳过,因为未设置属性“do.mkdist”

    您可以在build.xml文件中找到以下内容:

    <condition property="do.mkdist">
        <and>
            <isset property="do.archive"/>
            <isset property="libs.CopyLibs.classpath"/>
            <not>
                <istrue value="${mkdist.disabled}"/>
            </not>
        </and>
    </condition>
    

    在这之后,Debian也可以正常工作。

    ant脚本大约为60KB,它实际上是默认的netbeans脚本,我没有编辑任何内容。您可以在上面找到脚本。
    libs.CopyLibs.classpath=tools/org-netbeans-modules-java-j2seproject-copylibstask.jar