This week's book giveaway is in the HTML/CSS/JavaScript forum.
We're giving away four copies of Practical SVG and have Chris Coyier on-line!
See this thread for details.
Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

javax.comm problem !

 
jhun kam
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • 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, placed the javax.comm.properties at c:\j2sdk1.4.0\jre\lib folder, placed the win32com.dll at c:\j2sdk1.4.0\bin 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.
I tried running the BlackBox example that's also shipped with the extension API, and the message "No serial port found".
Please help;
 
Po-yu Chien
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should do identicat operation to jre under
program files directory.
I believe that`s your problem.
 
jhun kam
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should do identicat operation to jre under
program files directory.
how do i actually do that ? identicat operation to jre under program files directory ? i really dont get the idea. anyway, thanks for the help.
 
Jochen van Waasen
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hallo,
to copy all the files into the JDK directory structure is OK for developing and compiling.
But all the files must be present in the JRE file structure too. So copy it to the JRE directory of your operating system. So you have to do the identical operation to the OS JRE directory that you already did to your JDK directory.
When running your program it should find all the ports.

Hopefully this helps
Jochen
[ September 18, 2002: Message edited by: Jochen van Waasen ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!