wood burning stoves 2.0*
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 Murach's Java Servlets and JSP this week in the Servlets 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
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: how to run a perl program from java
Similar Threads
Communication between Java and Perl
Is there a data structure in Java equivalent to the hash in Perl?
How Java Appl comunicate with CGI/Perl script
Perl and PerlScript