Ich habe das: < /p>
ChannelExec channel1 = (ChannelExec) session.openChannel("exec");
String command1 = "/opt/deluge/latest/bin/deluge-console -c ./.config/deluge";
String commandCon = "connect 127.0.0.1:2035";
String location = channelSftp.getHome();
String command2 = "add " + location + "/torrent1.torrent";
channel1.setCommand(command1 + "\n" + commandCon + "\n" + command2);
channel1.connect();
< /code>
Aber es fügt nicht die Datei hinzu, die ich hinzufügen möchte. < /p>
Der vollständige Befehl, den ich benötige/opt/deluge/latest/bin/deluge-console -c ./.config/deluge
< /code>
Als wir dann mit der Flut-Console < /code> gestartet wurden, ist dies < /p>
connect 127.0.0.1:2035
< /code>
Eine Verbindung zum Daemon und dann < /p>
add /home/hd1/testuser/torrent1.torrent
< /code>
Ich weiß, dass meine Befehle korrekt sind, da ich sie ohne Java testen kann, aber aus irgendeinem Grund bekomme ich das Ergebnis, das ich in meinem obigen Code erwarte, nicht. < /p.>
JSCH Multiple Command -Probleme? ⇐ Java
-
- Similar Topics
- Replies
- Views
- Last post