Results 1 to 2 of 2
Thread: Help me for the following
- 05-15-2009, 03:00 PM #1
Member
- Join Date
- Apr 2009
- Posts
- 7
- Rep Power
- 0
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
- 05-15-2009, 05:04 PM #2
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 } } } }


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks