Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Java in General
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Java in General
Com ports
Bas Kortleven
Greenhorn
Posts: 1
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi all,
I'm trying to read some input coming in from a barcode reader through my COM port.
I'm using this code to detect the available com ports on my pc:
Enumeration portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Identifying com ports"); //list available ports while (portList.hasMoreElements()) { CommPortIdentifier portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { System.out.println("Found port: "+portId.getName()); } } System.out.println("Done locating ports");
On J2SDK 1.4.2_08 this works.. on later versions (I tried _10 and 1.5) this doesn't work anymore..
How do I use the new sdk (1.5) to read input from the com ports?
Thanks!
Joe Ess
Bartender
Posts: 9626
16
I like...
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Welcome to the JavaRanch.
The
Java
Comm API is discontinued. See the discussion
here
.
[
How To Ask Questions On JavaRanch
]
incandescent light gives off an efficient form of heat. You must be THIS smart to ride this ride. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Communicating over a virtual COM port
Serial Port IO
Getting available ports using Javax.comm
Tried for hours and hours to work this out, data buffer from one class back to my main class?
javax.comm can't enum ports
More...