# How to invoke a perl script from java program

**URL:** <https://community.unix.com/t/how-to-invoke-a-perl-script-from-java-program/186130>\
**Category:** Shell Programming and Scripting\
**Created:** [February 20, 2008, 12:13am UTC](https://community.unix.com/t/how-to-invoke-a-perl-script-from-java-program/186130 "2008-02-20T00:13:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![grajesh\_955](https://community.unix.com/letter_avatar/grajesh_955/32/5_5575768a8748004e209b776fc1b2916d.png) [@grajesh\_955](https://community.unix.com/u/grajesh_955)\
**Post date:** [February 20, 2008, 12:13am UTC](https://community.unix.com/t/how-to-invoke-a-perl-script-from-java-program/186130/1 "2008-02-20T00:13:11Z")

</div>

Hi:

I need to invoke a perl script from a java applet program in UNIX operating system.. Can you please suggest me!!!

---

<div class="post-metadata">

**Author:** ![manikantants](https://community.unix.com/letter_avatar/manikantants/32/5_5575768a8748004e209b776fc1b2916d.png) [@manikantants](https://community.unix.com/u/manikantants)\
**Post date:** [February 20, 2008, 1:19am UTC](https://community.unix.com/t/how-to-invoke-a-perl-script-from-java-program/186130/2 "2008-02-20T01:19:06Z")

</div>

not comfortable with Java.  
There will be some way to call unix commands from Java program like we can use 'system' in C programming. I guess you can use same method to call perl as well.

---

<div class="post-metadata">

**Author:** ![KevinADC](https://community.unix.com/letter_avatar/kevinadc/32/5_5575768a8748004e209b776fc1b2916d.png) [@KevinADC](https://community.unix.com/u/KevinADC)\
**Post date:** [February 20, 2008, 2:56am UTC](https://community.unix.com/t/how-to-invoke-a-perl-script-from-java-program/186130/3 "2008-02-20T02:56:54Z")

</div>

Ask on a java forum?

---

<div class="post-metadata">

**Author:** ![grajesh\_955](https://community.unix.com/letter_avatar/grajesh_955/32/5_5575768a8748004e209b776fc1b2916d.png) [@grajesh\_955](https://community.unix.com/u/grajesh_955)\
**Post date:** [February 20, 2008, 4:10am UTC](https://community.unix.com/t/how-to-invoke-a-perl-script-from-java-program/186130/4 "2008-02-20T04:10:40Z")

</div>

Thankx dude..

---

<div class="post-metadata">

**Author:** ![drl](https://community.unix.com/user_avatar/community.unix.com/drl/32/542_2.png) [@drl](https://community.unix.com/u/drl)\
**Post date:** [February 21, 2008, 9:42am UTC](https://community.unix.com/t/how-to-invoke-a-perl-script-from-java-program/186130/5 "2008-02-21T09:42:29Z")

</div>

Hi.

The first item of 600+ K hits from Google run command from java produced the tutorial article Running external system commands in Java applications at [Learn Java: Running external commands in Java applications](http://www.devdaily.com/java/edu/pj/pj010016/pj010016.shtml)

It included a sample java code which worked on my system (gcj-3.3), as did a modification to call a perl script ... cheers, drl
