Reputation: 39
String name="perl http://10.107.97.201//C:/KATool/code/names.pl ";
Process p = Runtime.getRuntime().exec(name);
BufferedReader stdInput = new BufferedReader(new
InputStreamReader(p.getInputStream()));
BufferedReader stdError = new BufferedReader(new
InputStreamReader(p.getErrorStream()));
// read the output from the command
System.out.println("Here is the standard output of the command:\n");
while ((s = stdInput.readLine()) != null) {
System.out.println(s);
}
I am unable to run the perl script from the server machine .. and above is the server ip( dummy) which is mentione in the application. Please help me in this.. And thanks in Advance..
Upvotes: 0
Views: 437
Reputation: 21
perl deals with filesystems, not internet protocols, so when you give perl "http://..." its like you gave notepad "http://...", it does not compute
So to run names.pl locally, first you have to download it (wget ...), then run it
Upvotes: 2
Reputation: 1002
Do you have access to remote machine? Can you run this line from your terminal:
perl http://10.107.97.201//C:/KATool/code/names.pl
Run this in your terminal and investigate the error message you got. Maybe perl script itself is broken, or just you don't have (or you lost) access to remote machine.
Upvotes: 0