zoukankan      html  css  js  c++  java
  • 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”,由于机器上第一次安装后是运行没有问题,重装系统后再次运行时出现上述问题。故思考将原来的压缩包,重新解压一下试试。然后神奇的,再次执行正常,未报上述错误。暂时解决。

    
    
  • 相关阅读:
    AngularJS ng-show 指令
    JavaScript 表单
    input type=”datetime”-local (Elements) – HTML 中文开发手册
    CSS3 overflow-y 属性
    ASP CodePage 属性
    Spring Boot的特性:外部化配置和配置随机值
    Java 之 Properties类 属性集
    Java 之 IO 异常的处理【了解】
    Java 之 字符输出流[Writer]
    Java 之 字符输入流[Reader]
  • 原文地址:https://www.cnblogs.com/kongzhongqijing/p/4738687.html
Copyright © 2011-2022 走看看