Archive for November 7th, 2006

Tuesday, November 7th, 2006

Modem Dial-Up in Java

If you need to perform modem dial-up from a Java program running in Windows, you have two choices: Learn port programming or use Windows built-in dialer.
This is how the Java code would look like:

Process prcHdl;
Runtime cmdHdl = Runtime.getRuntime();
String cmd = “rasdial myOffice myUser myPassword”;

try {
. prcHdl = cmdHdl.exec(cmd);
. prcHdl.waitFor();
. int prcExit = […]

No Comments » - Posted in Techs by datacrush