How can I call Perl from Java?

前端 未结 9 1731
自闭症患者
自闭症患者 2020-12-04 22:42

I have a Perl module that I would like to use from Java. Is there a way to call this code using either ActiveState Perl on Windows or the generic Perl that comes with Linux?

9条回答
  •  时光说笑
    2020-12-04 23:29

    Is this not what Runtime.exec() is for?

    Runtime.getRuntime().exec("/usr/bin/perl myPerl.pl");
    

    Or am I misunderstanding the question?

提交回复
热议问题