• 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

CommPortIdentifier.getPortIdentifiers is empty

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys, i got a problem about using javax.comm.

I've downloaded the Windows version of Java Commnunication API from java.sun.com.
I extracted the zip file, placed the comm.jar at c:\j2sdk1.4.0\jre\lib\ext folder.After that, i wrote a simple program to test whether i can get any serial/parallel port object from CommPortIdentifier.getPortIdentifiers();. It returns an empty enumeration, meaning that none of my ports are detected.
However I have checked that com1 port is exist using hyperterminal.
Please let me know if you have any information regarding this issue.

I have RFID card reader and I am trying to read data from rfid card.
 
Ranch Hand
Posts: 56
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

which windows version do you use?
What about the win32com.dll and javax.comm.properties?

win32com.dll -> c:\j2sdk1.4.0\jre\bin
javax.comm.properties -> c:\j2sdk1.4.0\jre\lib

Regards,
Ramon
 
skumar kk
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for reply.

I am using windows XP OS.
I have not done anything about the win32com.dll and javax.comm.properties file. Please tell me from where I should get these file or what will content of these files.
I am using Java1.6.
 
Ramon Anger
Ranch Hand
Posts: 56
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

it seems, using win32com.dll and javax.comm.properties is outdated. Oracle actually describes the howto use javax.comm for windows at http://www.oracle.com/technetwork/java/index-jsp-141752.html as follows:

Sun no longer offer's the Windows platform binaries of javax.comm, however javax.comm 2.0.3 can be used for the Windows platform, by using it in conjunction with the Win32 implementation layer provided by the RxTx project. To use that, download javax.comm for the 'generic' platform (which provides the front-end javax.comm API only, without platform specific back-end implementations bundled). Then acquire the Windows binary implementation rxtx-2.0.7pre1 from http://www.rxtx.org.

The website http://www.rxtx.org no longer exists but you can download that bundle from http://rxtx.qbang.org/wiki/index.php/Download

Hope that helps.
Cheers,
Ramon
 
skumar kk
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

My problem is resolved and now I am able to read rfid card data from java program. I got detail description on http://www.intellog.com/blog/?p=255#comment-47305 to resolve this issue.

Thanks ,
Skumar.
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

skumar kk wrote:Hello,

My problem is resolved and now I am able to read rfid card data from java program. I got detail description on http://www.intellog.com/blog/?p=255#comment-47305 to resolve this issue.

Thanks ,
Skumar.



I have the same problem ,java can't find ports.
I can't open the link above.
can you explain here how you solved it?

thanks
 
Bartender
Posts: 3323
86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Unfortunately you're unlikely to get an answer from skumar kk as he/she last posted in 2011.

It may be worth checking out our IO FAQ page as there are a number of articles on using comm ports.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ria De wrote:

I have the same problem ,java can't find ports.
I can't open the link above.
can you explain here how you solved it?

thanks



Ria, did you figure it out? Having a similar issue, but no luck.
 
Tony Docherty
Bartender
Posts: 3323
86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you check out the IO FAQ link I gave in my previous post?
If so and you still haven't found a solution can you describe your problem in detail (rather than just saying you have a similar issue).
reply
    Bookmark Topic Watch Topic
  • New Topic