Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / March 2004

Tip: Looking for answers? Try searching our database.

javax.comm problem

Thread view: 
Magnus - 01 Mar 2004 12:18 GMT
I need help to make my serial communication working.

I have loaded the javax.comm. package from sun and installed the
files:
C:\j2sdk1.4.2_01\bin\win32com.dll
C:\j2sdk1.4.2_01\lib\comm.jar
C:\j2sdk1.4.2_01\lib\javax.comm.properties  

I'm using NetBeans API and try to run the SimpleWrite.java which was
provided in the javax.comm. package.

When I run the code it never pass the line:
      while (portList.hasMoreElements()) {

portList.hasMoreElements() is always FALSE :-(

What's wrong???

// Magnus
William Brogden - 01 Mar 2004 14:58 GMT
> I need help to make my serial communication working.
>
[quoted text clipped - 13 lines]
>
> What's wrong???

Almost certainly the properties file is not being found
try  JAVA_HOME/jre/lib
if that doesn't work try spreading it around.

Bill
Knute Johnson - 01 Mar 2004 23:25 GMT
> I need help to make my serial communication working.
>
[quoted text clipped - 15 lines]
>
> // Magnus

You've got the files set up to compile but not run.  You need to put the
comm.jar file in your CLASSPATH and the javax.comm.properties file in
the runtime lib path (probably c:\Program Files\Java\j2re1.4.2_01\lib).
 You can put the comm.jar file there too.

Signature

Knute Johnson
email s/nospam/knute/
Molon labe...

Magnus - 02 Mar 2004 20:48 GMT
> > I need help to make my serial communication working.
> >
[quoted text clipped - 20 lines]
> the runtime lib path (probably c:\Program Files\Java\j2re1.4.2_01\lib).
>   You can put the comm.jar file there too.

It is working now!!!!!

The solution of the problem was to put the files here instead:
C:\j2sdk1.4.2_01\jre\bin\win32com.dll
C:\j2sdk1.4.2_01\jre\lib\comm.jar
C:\j2sdk1.4.2_01\jre\lib\javax.comm.properties  

Thanks for all the help
// Magnus

========================

http://www.hostedscripts.com/scripts/antispam.html
http://www.unclebobsuncle.com/antispam.html


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.