Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2006

Tip: Looking for answers? Try searching our database.

connecting to a virtual private network using Java

Thread view: 
cartercc@gmail.com - 27 Jun 2006 15:06 GMT
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/ 


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.