Perl in Java

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bdan44
    New Member
    • Apr 2007
    • 11

    #1

    Perl in Java

    HI,
    I have a perl script that I want to call in java. I can call it, the only problem is that the perl script has <STDIN> and the perl sciprt doesn't work. Other perl scripts(without <STDIN>) do work however. here is my code:
    import java.util.*;
    import java.io.*;
    class Rename {
    public static void main(String args[]) {
    try {
    Runtime r = Runtime.getRunt ime();
    r.exec("perl mydir/rename.pl");
    } catch (Exception e) {
    e.printStackTra ce();
    }
    }
Working...