diff options
author | Jesse Morgan <jesse@jesterpm.net> | 2012-10-15 23:38:17 -0700 |
---|---|---|
committer | Jesse Morgan <jesse@jesterpm.net> | 2012-10-15 23:38:17 -0700 |
commit | ca0b4614ae545e30b3f65b5414e7e7f535915c86 (patch) | |
tree | 3588b583a4689b97ed864a19af040f5a4fc1ae42 /src/MyClass.java |
Initial commit
Diffstat (limited to 'src/MyClass.java')
-rw-r--r-- | src/MyClass.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/MyClass.java b/src/MyClass.java new file mode 100644 index 0000000..4fac53f --- /dev/null +++ b/src/MyClass.java @@ -0,0 +1,16 @@ +import java.util.Enumeration;
+
+import gnu.io.CommPortIdentifier;
+
+public class MyClass {
+ public static void main(String... args) {
+ Enumeration ports = CommPortIdentifier.getPortIdentifiers();
+
+ while (ports.hasMoreElements()) {
+ CommPortIdentifier port = (CommPortIdentifier) ports.nextElement();
+
+ System.out.println(port.getName());
+ }
+ }
+
+}
\ No newline at end of file |