This may be a very simple question, but I'm completely lost at this
point.
We have a large code base in Perl, around 12,000 lines of code. Mostly,
this code runs queries on one remote database, manipulate the data, and
writes the data to another remote database. We lost the programmer that
wrote the code, and two of us inherited the code. Documenting the code
has proved to be a nightmare, and we are in the process of starting
from scratch and rewriting it. We are exploring alternatives to Perl,
and the first one is Java.
The first thing the Perl code does is open a VPN connection between our
machine and the remote database. The Perl is very simple, and looks
something like this:
my $retval = system('vpnc.exe -u username -p password -D
remotePIaddress');
print "Connected to VPN\n" if $retval;
For the life of me, I can't seem to figure out how you would do the
same thing in Java. Is there a VPN class that you can use to make a VPN
connection to a remote machine?
TIA. CC.
Matt Humphrey - 27 Jun 2006 15:45 GMT
> This may be a very simple question, but I'm completely lost at this
> point.
[quoted text clipped - 18 lines]
> same thing in Java. Is there a VPN class that you can use to make a VPN
> connection to a remote machine?
There's nothing in Perl that specifically knows how to connect to aVPN.
Rather, this Perl code is invoking an external program (vpnc.exe) that
establishes the VPN connection. You can do exactly the same thing in Java.
Look for Runtime.exec () and its many variations.
Cheers,
Matt Humphrey matth@ivizNOSPAM.com http://www.iviz.com/