• ant 安装过程中问题记录


    最近在本机安装ant过程中出现一些问题,在此记录一下。

    1、Unable to locate tools.jar. Expected to find it in C:/Program Files/Java/jre
    命令行敲ant命令后提示:“Unable to locate tools.jar. Expected to find it in C:/Program Files/Java/jre6/li”;

    查看ANT_HOME环境变量已经配置;

    解决途径:将“C:/Program Files/Java/jdk1.6.0_16/lib”目录下的tools.jar文件拷贝到“C:/Program Files/Java/jre6/lib”目录下,重新运行命令ant,运行正常,问题解决。

    2、build文件中无法执行scp或sshexec(用于远程连接linux服务器)

    D:Program Filesapache-ant-1.9.4uild.xml:32: Problem: failed to create task or type sshexec
    Cause: Could not load a dependent class com/jcraft/jsch/Logger
    It is not enough to have Ant's optional JARs
    you need the JAR files that the optional tasks depend upon.
    Ant's optional task dependencies are listed in the manual.
    Action: Determine what extra JAR files are needed, and place them in one of:
    -D:Program Filesapache-ant-1.9.4lib
    -C:Usersyu.antlib
    -a directory added on the command line with the -lib argument
    
    Do not panic, this is a common problem.
    The commonest cause is a missing JAR.
    
    This is not a bug; it is a configuration problem

    在网上查找许多解决方法,基本上都是jar包的事,比如jsch.jar非最新版本。

    使用的版本“apache-ant-1.9.4”,由于机器上第一次安装后是运行没有问题,重装系统后再次运行时出现上述问题。故思考将原来的压缩包,重新解压一下试试。然后神奇的,再次执行正常,未报上述错误。暂时解决。

    
    
  • 相关阅读:
    ubuntu下如何批量修改文件后缀名
    vanilla
    Ubuntu apt-get 彻底卸载软件包
    Kendall Rank(肯德尔等级)相关系数
    图像质量评估(IQA)
    conda常用命令
    在ubuntu中搜索文件或文件夹的方法
    libstdc++.so.6: version `GLIBCXX_3.4.21' not found
    迅雷磁力链接转BT种子工具
    springboot 集成mybatis plus3
  • 原文地址:https://www.cnblogs.com/kongzhongqijing/p/4738687.html
Copyright © 2020-2023  润新知