This is my first attempt to inline Java code in Perl. We cannot use the standard SFTP command on our system. This is out of my power. We have a jarfile called SFTP.jar which can
Okay. I figured it out. I had several things wrong:
use Inline (
Java => 'DATA',
J2SDK => $ENV{JAVA_HOME},
CLASSPATH => $PERL_CLASSPATH,
STUDY => ["SFTP", "close", "list", "get", "put", "remove"],
# DEBUG => 4,
);
use Inline (
Java => 'DATA',
J2SDK => $ENV{JAVA_HOME},
CLASSPATH => $PERL_CLASSPATH,
STUDY => ["SFTP"],
# DEBUG => 4,
);
new
, I have to give it the full Perl namespace:eval {$self->{CONNECTION} = new SFTP($server, $user, $password);};
eval {$self->{CONNECTION} = new FMS3::Sftp::SFTP($server, $user, $password);};
You spend several hours on something like this, give up, and then suddenly the light in the ol' dusty attic comes on. I'm a fairly smart guy. Stick a screwdriver in a live socket, and after the third or fourth time, I go "Hey, maybe that's not a good idea".