Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > connecting to a virtual private network using Java

Reply
Thread Tools

connecting to a virtual private network using Java

 
 
cartercc@gmail.com
Guest
Posts: n/a
 
      06-27-2006
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.

 
Reply With Quote
 
 
 
 
Matt Humphrey
Guest
Posts: n/a
 
      06-27-2006

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
> 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 http://www.velocityreviews.com/forums/(E-Mail Removed) http://www.iviz.com/


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Network Security / Virtual Private Networks International Alliance Privacy Services VOIP 0 01-24-2009 05:17 PM
how to access a private member function without using friend and virtual rajasekaran.psg@gmail.com C++ 2 01-05-2007 10:07 AM
private virtual functions and pure virtual functions with bodies John Goche C++ 10 12-08-2006 04:00 PM
Should 'public virtual' always become 'private virtual'? & using private inheritance qazmlp C++ 19 02-04-2004 12:37 AM



Advertisments