setConfig(Properties) in the type Session is not applicable for the arguments (String, String)”

浪子不回头ぞ 提交于 2019-12-01 15:02:42

There are three overloads of the Session.setConfig in latest JSch 0.1.55:

public void setConfig(java.util.Properties newconf)
public void setConfig(java.util.Hashtable newconf)
public void setConfig(String key, String value)

If you do not have the third overload, you must be using some very old version of JSch. The overload was introduced in JSch 0.1.34 in 2007!

https://epaul.github.io/jsch-documentation/simple.javadoc/com/jcraft/jsch/JSch.html#setConfig-java.lang.String-java.lang.String-

as said in documentation it's a static method so it should be the 'Session' where Session is the class not and object session. i hope you understand the difference.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!