Re: How to execute perl file which is located in the server path using Jcifs?
Michael B Allen <[email protected]> Fri, 21 Jun 2013 00:20:07 -0400
| Newsgroups | gmane.network.samba.java |
|---|---|
| Message-ID | <CAGMFw4jcUG+sMCZWetoTuuPR8RfCECTsEzdnJ-b1bGRDg4nbjg@mail.gmail.com> |
On Mon, Jun 10, 2013 at 7:24 AM, mariaprabudass <[email protected]> wrote: > Hi, > > I need to *execute my Perl script file using Java > Runtime.getRuntime().exec()*. But my perl script file *located in the server > path*. I tried via *java SmbFile system*. But I found an Error. Kindly > advise me, how to execute that perl script through *Java Jcifs* (Perl file > located in the server path). > > *Example:-* > > SmbFile serverPath = new > SmbFile("smb://domainName;userName:password@serverPath/"); > String ServerFilePath = serverPath + "test.pl"; > process = Runtime.getRuntime().exec("perl" + ServerFilePath); > > *Error:-* > > Can't open perl script > "smb://TNQADYAR;3975:[email protected]/production_clean/DELETED_IN_ONE_MONTH/nimble/xmlvalidate.pl": > No such file or directory HI mariaprabudass, By default Java does not understand smb:// URLs. But if you install the JCIFS smb:// URL handler with jcifs.Config.registerSmbURLHandler() it might work. Not sure. Mike -- Michael B Allen Java Active Directory Integration http://www.ioplex.com/