Thanks to all who responded.
I got a decent Java code (about 300 lines) thanks to Janet Traub, which
implements FTP and that solves our problem.
When I tried a simple Runtime.exec(..), I started getting IOExceptions and
was soon discouraged, thinking about the CP and multiple threads and all
that. It is a little beyond my imagination what all can go wrong since the
Java Docs says that exec(..) will be executed in a Separate Process. exec
throws IOException and I promptly got it.
> -----Original Message-----
> From: Hill, Les [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, April 27, 1999 5:04 PM
> To: Mathew, Aby; 'Johnston, Brendan '; 'Suket N Gandhi'; ND4 (E-mail)
> Subject: Re: [ND] FTP using Java
>
> Mathew,
>
> I think you might be mistaken about the ability to exec processes from
> within ND. This would be a straightforward invocation of the
> java.lang.Runtime.exec() method from within your Java code. An installed
> SecurityManager could prevent the exec from occuring, but I don't believe
> ND
> is installing one (or at least not a restrictive one!).
>
> As to FTP, I think you are dead on with the Java FTP code -- have you
> tried
> www.gamelan.com and done a search there?
>
> [EMAIL PROTECTED]
> Team NetDynamics
>
> > -----Original Message-----
> > From: Mathew, Aby [SMTP:[EMAIL PROTECTED]]
> > Sent: Tuesday, April 27, 1999 2:04 PM
> > To: 'Johnston, Brendan '; 'Suket N Gandhi'; ND4 (E-mail)
> > Subject: Re: [ND] FTP using Java
> >
> > Brendan,
> >
> > I'll answer for Suket since I am remotely involved in this and since his
> > time zone is one which keeps him in deep sleep at this time.
> >
> > The requirement, as far as I understand is that some kind of file need
> to
> > be
> > FTPed from the ND Server machine onto some remote Server machine, and
> this
> > activity is to be triggered from an ND intranet application.
> >
> > They had a shell script which used to do the FTP, and they were thinking
> > of
> > wrapping it inside a C program and calling runtime.exec(..) from an ND
> > Page
> > to get it done. From my understanding of ND architecture, ND won't be
> > happy
> > with somebody doing exec(), since this would want to create a new system
> > process.
> >
> > I advised him that the neat and straightforward solution is to implement
> > FTP
> > using a Java function using Socket. We hoped to get some ready-made
> stuff
> > or
> > some useful hints from some generous souls instead of re-inventing the
> > wheel. I don't know what is the effort involved in implementing FTP
> using
> > Java, but hope it is reasonable.
> >
> > Thanks,
> >
> > Aby
> >
> > > -----Original Message-----
> > > From: Johnston, Brendan [SMTP:[EMAIL PROTECTED]]
> > > Sent: Tuesday, April 27, 1999 1:14 PM
> > > To: 'Suket N Gandhi'; ND4 (E-mail)
> > > Subject: Re: [ND] FTP using Java
> > >
> > > Why do you care whether the file is ftp'd rather than http'd?
> > >
> > > Is the file static? Why don't you just have a link to it? That is
> > > trivial
> > > compared to a button.
> > >
> > > Brendan Johnston
> > > TeamND
> > >
> > >
> > > -----Original Message-----
> > > From: Suket N Gandhi [SMTP:[EMAIL PROTECTED]]
> > > Sent: Sunday, April 25, 1999 9:22 PM
> > > To: ND (E-mail); ND4 (E-mail); [EMAIL PROTECTED]
> > > (E-mail)
> > > Subject: [ND] FTP using Java
> > > Importance: High
> > >
> > > Hi,
> > >
> > > We have a requirement where in we would like to ftp a file on click
> > > of a
> > > button in an ND page.
> > > Any suggestions on how this can be done in Java will be greatly
> > > appreciated.
> > > If anybody has a ready-made example/code already written,it would be
> > > very helpful if you could share it.
> > >
> > > Thanks
> > >
> > > Suket
> > > ND Team, ITS
> > >
>
_________________________________________________________________________
For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
For dire need help, email: [EMAIL PROTECTED]