Thanks Ulf but I'm getting error while copying file. It's the CopyTo.java code (from jcisf examples)
import jcifs.smb.SmbFile;
public class CopyTo {
public static void main(
String argv[] ) throws Exception {
SmbFile from = new SmbFile( argv[0] );
SmbFile to = new SmbFile( argv[1] );
from.copyTo( to );
}
}
and when i run the command on linux m/c
java CopyTo
smb://username:loginPswd@172.19.47.101/usr/java/z.txt smb://username:loginPswd@172.19.39.53/share/deploy I get the foll exception
Exception in
thread "main" jcifs.smb.SmbException:
jcifs.util.transport.TransportException
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:507)
at java.net.Socket.connect(Socket.java:457)
at java.net.Socket.<init>(Socket.java:365)
at java.net.Socket.<init>(Socket.java:178)
at jcifs.smb.SmbTransport.ssn139(SmbTransport.java:178)
at jcifs.smb.SmbTransport.negotiate(SmbTransport.java:236)
at jcifs.smb.SmbTransport.doConnect(SmbTransport.java:301)
at jcifs.util.transport.Transport.run(Transport.java:223)
at java.lang.Thread.run(Thread.java:595)
at jcifs.util.transport.Transport.run(Transport.java:239)
at java.lang.Thread.run(Thread.java:595)
at jcifs.smb.SmbTransport.connect(SmbTransport.java:288)
at jcifs.smb.SmbTree.treeConnect(SmbTree.java:132)
at jcifs.smb.SmbFile.connect(SmbFile.java:791)
at jcifs.smb.SmbFile.connect0(SmbFile.java:761)
at jcifs.smb.SmbFile.copyTo(SmbFile.java:2005)
at CopyTo.main(CopyTo.java:9)
Please help.
cheers
[ April 02, 2006: Message edited by: robbie keane ]