in reply to how can you pass values from the objects in java to the perl program?

Sure, but only if your program is standalone (or possibly if you fiddle the browser security settings). Use Exec to start the Perl process, passing the info on the command line. If the Perl process does all the remaining processing, you can use execPrint or just let the process run (after, say, exec) and print output.

If you need to communicate with the new process, it would probably be best to open a TCP connection to the Perl child. You might be able to use a Java pipe, but I do not know if it can be used across languages.

HTH, --traveler

Replies are listed 'Best First'.
Re: Re: how can you pass values from the objects in java to the perl program?
by Anonymous Monk on Aug 15, 2001 at 02:23 UTC
    Thnx for ur reply. I am still havimng some problem. I have done as shown below: I am passing those values to a string Object like this-- contract_number = ivjTextField2 .getText();
    member_id = ivjTextField3.getText();
    start_date = ivjTextField4.getText();
    end_date = ivjTextField5.getText();
    and then, Runtime R = Runtime.getRuntime();
    R.exec("d:\\ActivePerl\\bin\\perl rscdetail2.pl " + contract_number+" "+member_id+" "+start_date+" "+end_date);
    but it's not doing any thing. Can u please help on this. Thanx in advance!! PS: i am using Active Perl for Windows Platform and visual Age for Java.
      Where is rscdetail2.pl located?
      Try specifying the full path to it.
        As you can see above, i have specified the full path -
        R.exec("d:\\ActivePerl\\bin\\perl rscdetail2.pl " + contract_number+" "+member_id+" "+start_date+" "+end_date); I tried using the debugger in visual age and had a look at the value generated from it:
        "d:\\ActivePerl\\bin\\perl rscdetail2.pl " + contract_number+" "+member_id+" "+start_date+" "+end_date It looks like it is correct.. ????????????
        As you can see above, I havementioned 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() ???????????????