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

    
    
  • 相关阅读:
    js+servlet实现百度搜索栏下拉框的实现
    python time模块
    dajngo基础
    MySQL解决时区问题:datadrip com.mysql.cj.exceptions.InvalidConnectionAttributeException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone.
    数据库连接池
    超星学习通绕开鼠标监控的方法
    centos7 安装python3
    docker命令
    爬虫一
    学习python的第九天笔记
  • 原文地址:https://www.cnblogs.com/kongzhongqijing/p/4738687.html
Copyright © 2011-2022 走看看