Thank you guys for your replies. Finally I got it to work with the toscomm.dll and getenv.dll library from TinyOS by just linking the tinyos.jar with these libraries in Eclipse. Then I created an executable jar file with my project and I just need to have these dll files in the same directory as the jar. The exception I was having was caused by an VMWare machine which was running on my PC and had the serial port busy.
By the way, Michael when you say that's what you have in your JRE, you mean that you placed these files in the corresponding directories, right? Does this have anything to do with the java.library.path ? Regards 2010/4/7 Michael Schippling <[email protected]>: > okokok, I use the old snuffly javacomm20 for windows not TOSComm, > but here's what I have in my JRE: > > jre/bin: > getenv.dll win32com.dll > jre/lib: > javax.comm.properties > jre/lib/ext: > comm.jar > > I don't know if TOSComm's uses the old comm.jar or something else, > nor what it's dll file name might be, but you probably need a > simulacra of each of the files shown. > > MS > > David Conde wrote: >> >> Hi, >> >> I had a similar problem because I did not have permission for reading >> javax.comm.properties file but I was using UBUNTU Operative System, so I >> guess in Windows should not be a problem. >> >> Do you have javax.comm installed in your computer?If you do, do you have >> javax.comm.properties in the right place? >> >> Regards >> >> -----Mensaje original----- >> De: [email protected] >> [mailto:[email protected]] En nombre de Ruben >> Rios >> Enviado el: miércoles, 07 de abril de 2010 11:31 >> Para: Michael Schippling; Arik Sapojnik >> CC: tinyos-help >> Asunto: Re: [Tinyos-help] JNI Questions >> >> Thank you for the quick reply both of you :) By the way, I am working >> on a Windows machine. I have tried to copy both toscomm.dll and >> getenv.dll from my TinyOS (under Cygwin) installation to the working >> directory (where my app is running) but I still get the following >> error: >> >> >> java.io.IOException: Could not open COM1: TOSComm JNI library runtime >> error: Error 5. >> Acces denied. >> in NativeSerialPort.CreateFile >> at >> net.tinyos.packet.SerialByteSource.openStreams(SerialByteSource.java:58) >> at net.tinyos.packet.StreamByteSource.open(StreamByteSource.java:51) >> at net.tinyos.packet.Packetizer.openSource(Packetizer.java:139) >> at net.tinyos.packet.AbstractSource.open(AbstractSource.java:69) >> at net.tinyos.packet.Packetizer.open(Packetizer.java:132) >> at >> >> Localization.WSNLocalizatorImpl.executeInputParser(WSNLocalizatorImpl.java:4 >> 6) >> at Localization.WSNLocalizatorTest.main(WSNLocalizatorTest.java:43) >> stream:error (text) >> >> Any ideas? >> Thanks a lot >> >> >> 2010/4/7 Michael Schippling <[email protected]>: >>> >>> You will need to install (or copy) the TOS comm and getenv.dll >>> files to your new system's Java Runtime. I'm not sure exactly >>> what the file names are, but some searching for those two should >>> come up with more. You don't need cygwin or the rest of TOS if >>> all you are doing is running a java app. >>> >>> MS >>> >>> >>> Ruben Rios wrote: >>>> >>>> Dear all, >>>> >>>> I have written a Java application which gets data from sensor nodes >>>> through the serial port. I have done this by using tinyos.jar. >>>> Everything's fine to this point. I have tried to use this application >>>> in another machine which has no TinyOS installed in it and it prompts >>>> different errors depending on the situation. The first problem I come >>>> across is an exception telling "The toscomm JNI library was not found >>>> ...". Does it mean I need to install Cygwin + TinyOS on that machine >>>> to get it working? May I simply add some files to my working directory >>>> or Java directory to make it work? >>>> >>>> Any comments, ideas, workarounds, are really appreciated! >>>> Regards >>>> _______________________________________________ >>>> Tinyos-help mailing list >>>> [email protected] >>>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help >> >> _______________________________________________ >> Tinyos-help mailing list >> [email protected] >> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help >> >> >> _______________________________________________ >> Tinyos-help mailing list >> [email protected] >> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
