Hi all,
I try this SFTP library with a very little piece of code.
I initialize like this in activity_create
i send a command like this
Callback
But i get this error:
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.jcraft.jsch.ChannelSftp.pwd()' on a null object reference
My credentials are ok, i have tested them with a sftp client.
Have i idea ?
Thank's for your help
I try this SFTP library with a very little piece of code.
I initialize like this in activity_create
B4X:
If FirstTime Then
sftp1.Initialize("sftp1", "USER", "PASSWORD", "HOST", 22)
sftp1.SetKnownHostsStore(File.DirInternal, "hosts.txt")
End If
i send a command like this
B4X:
sftp1.GetCurrentPath
Callback
B4X:
Sub sftp1_CommandCompleted(Command As String, Success As Boolean, Reply As String)
Log(Success)
If Success Then
ToastMessageShow(Command,False)
ToastMessageShow(Reply,False)
Else
Log(LastException.Message)
End If
End Sub
But i get this error:
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.jcraft.jsch.ChannelSftp.pwd()' on a null object reference
My credentials are ok, i have tested them with a sftp client.
Have i idea ?
Thank's for your help