Results 1 to 2 of 2
  1. #1
    azibhai is offline Member
    Join Date
    Apr 2009
    Posts
    7
    Rep Power
    0

    Default Help me for the following

    I am new to java.I am using jdk1.5.0_18 and I have coding to list the ports . When I run this it showing

    Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.Win32Driver
    javax.comm.NoSuchPortException


    please help me sombody
    thanks in advance

  2. #2
    Mr.Beans's Avatar
    Mr.Beans is offline Senior Member
    Join Date
    Apr 2009
    Location
    Virginia Beach, Virginia
    Posts
    149
    Rep Power
    0

    Default

    How are you listing all the ports?

    Can you show us an example so we can better help you?

    Did you try something like
    Java Code:
    public class LowPortScanner {
      public static void main(String[] args) {
        String host = "localhost";
        if (args.length > 0) {
          host = args[0];
        }
        for (int i = 1; i < 1024; i++) {
          try {
            Socket s = new Socket(host, i);
            System.out.println("There is a server on port " + i + " of " 
             + host);
          }
          catch (UnknownHostException ex) {
            System.err.println(ex);
            break;
          }
          catch (IOException ex) {
            // must not be a server on this port
          }
        } 
      }
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •