Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Urgent: Calling perl from Java

 
Varun Khanna
Ranch Hand
Posts: 1400
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Does anybody knows how to invoke a perl script from java code?
If my java file and perl script is in same folder then calling perl like:
Runtime rt = Runtime.getRuntime();
Process p = rt.exec("perl test1.pl");
is working fine but placing perl in different directory not working
like:
Runtime rt = Runtime.getRuntime();
Process p = rt.exec("perl /abc/efg/test1.pl");
it is not giving any error or exception.
Any solution?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic