rgwest61 has asked for the wisdom of the Perl Monks concerning the following question:
My basic question - "How to call existing Java method from Perl" has been asked and answered before, but I am confused by the various different responses. Instead of describing the Java code implemented I have provided code snippets (with possible syntax errors) providing the key elements below.
Public Class ConnProperties{ private String driver; private String url; private String username; private String password; public ConnProperties(){ setDriver(null); setUrl(null); setUsername(null); setPassword(null); } ... attribute getter and setter methods } Public Class ConnPropertiesInterface(){ public ConnPropertiesInterface(){ super(); } public ConnProperties getProperties(String appID){ ConnProperties connProps = new ConnProperties(); ... Get Connection Properties from configuration file based on ... appID, update ConnProperties object with returned ... values such as connProps.setDriver(result.getString("driver")); connProps.setUrl(result.getString("url"); return connProps; } }
From existing Perl applications I need to be able to ultimately call the getProperties() method within class ConnPropertiesInterface and to decompose the returned ConnProperties object attributes to be used for connecting to an Oracle database. I have generated a jar file of the existing Java classes so that existing Java applications can successfully call this same method, now I just need to do the same from existing Perl applications. Being very new to Perl programming I am not sure the most correct/efficient way to accomplish this task. Thanks ahead of time for your help/assistance.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Dazed/Confused from previous posts on how to call Java method from Perl
by Paladin (Vicar) on May 11, 2016 at 22:00 UTC | |
Re: Dazed/Confused from previous posts on how to call Java method from Perl
by iguanodon (Priest) on May 12, 2016 at 23:28 UTC | |
by rgwest61 (Initiate) on May 13, 2016 at 14:21 UTC | |
by iguanodon (Priest) on May 14, 2016 at 03:46 UTC | |
Re: Dazed/Confused from previous posts on how to call Java method from Perl
by afoken (Chancellor) on May 12, 2016 at 20:45 UTC | |
Re: Dazed/Confused from previous posts on how to call Java method from Perl
by rgwest61 (Initiate) on May 13, 2016 at 18:16 UTC | |
by afoken (Chancellor) on May 13, 2016 at 18:43 UTC |