ChannelExec channel = null;
try {
// open an 'exec' channel on the session and set the command
channel = (ChannelExec) session.openChannel("exec");
// "\\" in front of the command discards the alias defined on the remote box
channel.setCommand("\\" + command);
cr.setCommand(command);
...
Executing commands on windows seems to be gobbling up any "\" characters in the command. Anyone else have this problem? I'm using Jsch 1.30. Help!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
ChannelExec channel = null;
try {
// open an 'exec' channel on the session and set the command
channel = (ChannelExec) session.openChannel("exec");
// "\\" in front of the command discards the alias defined on the remote box
channel.setCommand("\\" + command);
cr.setCommand(command);
...
Executing commands on windows seems to be gobbling up any "\" characters in the command. Anyone else have this problem? I'm using Jsch 1.30. Help!