connecting to a virtual private network using Java

C

cartercc

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.
 
M

Matt Humphrey

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?

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 (e-mail address removed) http://www.iviz.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top