• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How can you pass the arguments from the java program to the perl program?

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a stand alone application which take the inputs from the user. i have a perl program which works fine on its own.
But is there any way where i can take the inputs from that stand alone java application and pass the inputs to this perl program to do some processing?
 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is not clear whether you want to do something like
java <yourjavaprogram> | perl <yourperlprogram>
or call a perl program from java, passing stuff to the perl program when it requests input and getting what the program sends as an output (which is feasible too).
 
author
Posts: 621
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To do this from an application, you can just do this.
Process p = Runtime.getRuntime().exec("call perl programm here using normal command line...");
Sean
 
john klucas
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi sean,
Can u please elaborate on this. I am novice to perl so can u please explain about what u said..? how do u call a perl program from command line..
i am running that perl program on WIN32 platform. I am using Active perl for win32.
I want to take input from the front end(java application)and pass those values to the perl program to do some processing.

Thanks in advance!
 
john klucas
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi sean,
Can u please elaborate on this. I am novice to perl so can u please explain about what u said..? how do u call a perl program from command line..
i am running that perl program on WIN32 platform. I am using Active perl for win32.
I want to take input from the front end(java application)and pass those values to the perl program to do some processing.

Thanks in advance!
 
Get meta with me! What pursues us is our own obsessions! But not this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic