File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes how to run a perl program from java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "how to run a perl program from java" Watch "how to run a perl program from java" New topic

how to run a perl program from java

dan nwankwo

Joined: May 23, 2001
Posts: 8
I have a perl script which does exactly what i want. Now i want to design an interface with java swing and execute the perl script at the click of a button on my interface. What methods/classes do i use to acheive this.
Appreciate any suggestions, Thanks
Aleksey Matiychenko
Ranch Hand

Joined: Apr 03, 2001
Posts: 178
Checkout Runtime and Process classes
Snigdha Solanki
Ranch Hand

Joined: Sep 07, 2000
Posts: 128
Runtime r = Runtime.getRuntime();
Process p = r.exec("perl...");

Snigdha<br />Sun Certified Programmer for the Java™ 2 Platform
I agree. Here's the link:
subject: how to run a perl program from java
Similar Threads
Perl and PerlScript
Is there a data structure in Java equivalent to the hash in Perl?
Communication between Java and Perl
How Java Appl comunicate with CGI/Perl script