Bringing up the dial-up networking connection window in Java

In Windows 95/98/ME, the dial up items are not traditional exe files. The following command line executes the necessary files to start a dialup session:

   c:windowsRUNDLL32.EXE RNAUI.DLL,RnaDial <your DUN connection name>

Applied in Java: create a Batch file containing this line and call this file through the Runtime class:
Dial.bat

start /wait rundll32.exe rnaui.dll,RnaDial My Connection

DialUp.java:

import java.io.*;
 
public class DialUp
{ 
   public static void main(String []args) {
      try {
         Process p = Runtime.getRuntime().exec("Dial.bat");
         p.waitFor();
      }
      catch (Exception e) {
         System.out.println(e);
      }
   }
}