首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法加载依赖类com/jcraft/jsch/Logger

无法加载依赖类com/jcraft/jsch/Logger
EN

Stack Overflow用户
提问于 2013-05-24 23:05:48
回答 1查看 15.6K关注 0票数 9

当尝试在包含scp任务的Eclipse的ant中执行目标时,我得到了一个错误

代码语言:javascript
复制
BUILD FAILED
D:\Users\Dims\Design\liferay-plugins-sdk-6.1.1-tomcat-6.0.37-x64-liferay-6.1-GA2\portlets\scisbo-portlet\build.xml:11: Problem: failed to create task or type scp
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:\APPS\eclipse-liferay-ide\plugins\org.apache.ant_1.8.2.v20120109-1030\lib
        -C:\Users\dims\.ant\lib
        -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文件

代码语言:javascript
复制
D:\...eclipse-liferay-ide\plugins\org.apache.ant_1.8.2.v20120109-1030\lib>dir
ant-antlr.jar         ant-apache-oro.jar       ant-commons-logging.jar  ant-jdepend.jar  ant-junit4.jar    ant-testutil.jar
ant-apache-bcel.jar   ant-apache-regexp.jar    ant-commons-net.jar      ant-jmf.jar      ant-launcher.jar  ant.jar
ant-apache-bsf.jar    ant-apache-resolver.jar  ant-jai.jar              ant-jsch.jar     ant-netrexx.jar   ecj.jar
ant-apache-log4j.jar  ant-apache-xalan2.jar    ant-javamail.jar         ant-junit.jar    ant-swing.jar     jsch-0.1.50.jar

但这并不管用。

com/jcraft/jsch/Logger.class文件在这个JAR中。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-05-25 03:04:29

尝试修复类路径的方法就是在使用独立Ant时所采用的方法。这是由Eclipse管理的。

您仍然可以为Ant的类路径做贡献。只需进入Eclipse首选项,在Ant/Runtime条目中的'Classpath‘选项卡中。使用'Add External Jars‘按钮将您的jsch.jar添加到Ant的类路径中。

票数 17
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/16738118

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档