aspose file tools*
The moose likes Java in General and the fly likes How can you pass the arguments from the java program to the perl program? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "How can you pass the arguments from the java program to the perl program?" Watch "How can you pass the arguments from the java program to the perl program?" New topic
Author

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

john klucas
Greenhorn

Joined: Jul 31, 2001
Posts: 23
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?
Vlad Patryshev
Ranch Hand

Joined: Jun 30, 2001
Posts: 61
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).


Thanks,<br />Vlad
Sean MacLean
author
Ranch Hand

Joined: Nov 07, 2000
Posts: 621
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

Joined: Jul 31, 2001
Posts: 23
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

Joined: Jul 31, 2001
Posts: 23
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!
 
Don't get me started about those stupid light bulbs.
 
subject: How can you pass the arguments from the java program to the perl program?