Hi,
Martin, thank you for your prompt and reasonable answer.
|On Tue, Nov 4, 2008 at 3:18 PM, Oberhuber, Martin
|<[EMAIL PROTECTED]> wrote:
>> the method signature from your backtrace indicates a void
>> return value -- I)V -- but according to the Sources
>> that I see, the method in JSch in Eclipse 3.4 has an
>> int return value. In other words, it appears to be
>> source compatible but not binary compatible.
Since jsch 0.1.32, setPortforwardingL(int, String, int) will
return the assigned local port number.
Eclipse SDK 3.3 had included jsch 0.1.31, and on the other hand
Eclipse Ganymede has included jsch 0.1.37.
+-From: "Mark Phippard" <[EMAIL PROTECTED]> --
|_Date: Tue, 4 Nov 2008 15:25:45 -0500 ________
|
|Ahh thanks. Maybe I can find a method that existed on 3.3 and 3.4
|that can be used.
I think there will not a method to work on both.
To save your time, I'll show you the code using the reflection to work
around that issue,
// session.setPortforwardingL(lport, rhost, rport)
try{
Class cSession = session.getClass();
Class[] carg = new Class[]{int.class,
String.class,
int.class};
Object[] oarg = new Object[]{new Integer(lport),
rhost,
new Integer(rport)};
java.lang.reflect.Method mSetPortForwarding =
cSession.getMethod("setPortForwardingL", carg);
mSetPortForwarding.invoke(session, oarg);
}
catch(NoSuchMethodException nsme){
// it will not be thrown.
}
}
Sincerely,
--
Atsuhiko Yamanaka
JCraft,Inc.
1-14-20 HONCHO AOBA-KU,
SENDAI, MIYAGI 980-0014 Japan.
Tel +81-22-723-2150
+1-415-578-3454
Fax +81-22-224-8773
Skype callto://jcraft/
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
JSch-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jsch-users