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?
If you wanted to make a machine-specific call you could use the Runtime.getRuntime().exec("appname " + arglist), in the middle of your program to reference an external application. Hope this helps, Larry
Well that's your problem John, you're using VisualAge . Just kidding. Actually, I'm not sure exactly what kind of elaboration I can provide you, except to make sure that you reference your Perl program with the exec() call relative to that path that it is in, and make sure that the arguments that you append to the string match the arguments that you take in from the command-line with your Perl program. Maybe if I knew the kind of problem you were running into (specifically), I could help you better. Did you try the command above? Where is your java program and your perl program located? Let me know what you're running into. Hope I can help, Larry
I have mentioned the full path : Runtime R = Runtime.getRuntime();
R.exec("d:\\ActivePerl\\bin\\perl rscdetail2.pl " + contract_number+" "+member_id+" "+start_date+" "+end_date); I used Visual age Debugger and checked the value it generates from this -- "d:\\ActivePerl\\bin\\perl rscdetail2.pl "+ contract_number+" "+member_id+" "+start_date+" "+end_date i guess its generating a correct path to look up for rscdetail2.pl but for some reason it's not understanding R.exec() ??? Does it have to do anything with Active perl for windows platform.
Post by:autobot
Grow your own food... or this tiny ad:
a bit of art, as a gift, the permaculture playing cards