• 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
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

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!
 
What's that smell? Hey, sniff this tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic