Home: Perl Programming Help: Advanced:
Calling JAVA API

New User

Jun 15, 2017, 11:55 PM

Views: 4468
Calling JAVA API

There are some Java APIs. I need to write a code on calling those Java APIs from a Perl script. One will be for insertion records in the oracle database calling the API and the other API will be to read the return data-set and write in a file.
Can anyone help me in building up the knowledge on how to do this in Perl.

Veteran / Moderator

Jun 16, 2017, 8:21 AM

Views: 4457
Re: [eroykam] Calling JAVA API

Perl has multiple ways to run external programs.

The most common method is to use the system() function.

Another option is to use the ` ` backticks or qx() operator. You can learn about them in the perlop documentation.

Another option, if you need/want more control, would be to use one of the IPC modules, such as IPC::Run