summaryrefslogtreecommitdiff
path: root/src/MyClass.java
diff options
context:
space:
mode:
authorJesse Morgan <jesse@jesterpm.net>2012-10-15 23:38:17 -0700
committerJesse Morgan <jesse@jesterpm.net>2012-10-15 23:38:17 -0700
commitca0b4614ae545e30b3f65b5414e7e7f535915c86 (patch)
tree3588b583a4689b97ed864a19af040f5a4fc1ae42 /src/MyClass.java
Initial commit
Diffstat (limited to 'src/MyClass.java')
-rw-r--r--src/MyClass.java16
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