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

how to run a perl program from java

 
dan nwankwo
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Checkout Runtime and Process classes
 
Snigdha Solanki
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Basically,
Runtime r = Runtime.getRuntime();
Process p = r.exec("perl...");
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic