Refresh serial port

P

Paolino

I have this problem.
I wrote an application for Windows OS that shows to the user which
serial ports are available on his local machine.
When i wrote the code i used the method of Java Communication Api
"javax.comm.CommPortIdentifier.getPortIdentifiers()" to get an
Enumaration cointainig all the ports present on the system.
My application should also show the virtual serial ports created by the
dongle bluetooth's driver during the running of my application.
In fact my application has a fetaure that should allow the refresh of
the ports present on local machine. This feature was implemented
recalling javax.comm.CommPortIdentifier.getPortIdentifiers() but this
method does't see the new ports created.
If i restart my application, the new ports are shown correctly.
Can someone say me how to resolve my problem?
Thanks
Paolo
 
J

jan V

Paolino said:
I have this problem.
I wrote an application for Windows OS that shows to the user which
serial ports are available on his local machine.
When i wrote the code i used the method of Java Communication Api
"javax.comm.CommPortIdentifier.getPortIdentifiers()" to get an
Enumaration cointainig all the ports present on the system.
My application should also show the virtual serial ports created by the
dongle bluetooth's driver during the running of my application.
In fact my application has a fetaure that should allow the refresh of
the ports present on local machine. This feature was implemented
recalling javax.comm.CommPortIdentifier.getPortIdentifiers() but this
method does't see the new ports created.
If i restart my application, the new ports are shown correctly.
Can someone say me how to resolve my problem?
Thanks
Paolo

As others have pointed out in the group, the Java Communication Api is old
and probably not supported by Sun anymore. If I were you, I'd track down the
original authors in the hope I could get some hard info on this API. Maybe
you could even get the full source code, in which case you're in full
control.

Your alternative is the demoralizing scenario whereby you need to wrestle
with an antique API that simply isn't going to deliver the goods for your
problem..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,965
Messages
2,570,148
Members
46,710
Latest member
FredricRen

Latest Threads

Top