Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8148183
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T14:35:51+00:00 2026-06-06T14:35:51+00:00

I have a requirement where i have to read data streams coming on serial

  • 0

I have a requirement where i have to read data streams coming on serial port. I am using javax.comm API for same.

When I try to list ports, using below code I never get any port list.

portList = CommPortIdentifier.getPortIdentifiers();
System.out.println("start: "+portList.hasMoreElements());

It returns false.

Can anyone help me if I am missing anything?


My PS2 port didn’t came in list. Is there any other way to list PS2 port??

My full code is as below,

    while (portList.hasMoreElements()) {
       portId = (CommPortIdentifier) portList.nextElement();
       System.out.println("portid: "+portId.getName());
    }

output

portid: COM1
portid: COM3
portid: LPT1

My actual requirement is to read data on USB port. I was facing issues using JUSB and it didn’t work. So I decided to get serial to USb converter and read on serial port. But, there is no such convertable available in market.

Now, thinking of another work around I was able to get a PS2 to usb converter. It would be great if you could help me listing PS2 port using Java and read/write to it or suggest some API for same on windows platform.

Any help in this regard is highly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T14:35:52+00:00Added an answer on June 6, 2026 at 2:35 pm

    Please see:
    http://www.intellog.com/blog/?p=255 and http://www.coderanch.com/t/535173/Streams/java/CommPortIdentifier-getPortIdentifiers-empty (the latter points to the first)

    Oracle does not offer the binaries for windows (assuming that you’re on windows): http://www.oracle.com/technetwork/java/index-jsp-141752.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the requirement to read/search the huge amount of data from CoreData API.
i have a requirement to read data from a gif. The gif is exported
I have a requirement of waiting using read until a buffer is full on
We have a requirement to store char data of different language in the same
I have a requirement in Java (Spring) to read data from an Excel spreadsheet
I have a specific requirement to read a resource from jar file and then
I have requirement to get Facebook friends list with their images. How can I
I've got a requirement to both read and write data via a .net webservice
I want to read XML data using XPath in Java, so for the information
I have a requirement to store certain data in an encrypted form in Postgres.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.