Hi Jerry, Never heard of the Mysaifu JVM before. Looks like this is a full JVM (not JME). Wow, didn't know that this runs on Windows Mobile.
How did you get the DLL that you put on the iPAQ? If you just copied it from your windows system, it probably won't work because it's a different processor architecture. Windows runs on x86 processors, while Windows Mobile (on the iPAQ) runs on an ARM (Intel XScale) processor, if I remember correctly. As far as I know they are not compatible, and this might explain why loading the library fails. You might get more error details if you print the stack trace of the error (t.printStackTrace()). I see two possibilities: 1) You could try to compile toscomm and getenv for the iPAQ (if you do, could you send me the compiled libraries?). I'm not sure whether you could take the source code as is, or whether it would need additional modifications. I also have no idea how you would compile them for the iPAQ. 2) You could try to use the serial communication package that comes with the Mysaifu JVM (separate download on their sourceforge.jp page). Getenv is probably not vital to your project and you could remove it. If you use this approach, you might have to modify the TinyOS libraries a bit to make them use the communication package instead of the TinyOS JNI libraries (probably in net.tinyos.comm.TOSSerial). It should not be too hard, I once did this to get it to work with J2ME. Cheers, Urs On 8/29/10 6:41 PM, z qin wrote: > Hello Urs, > > Thank you for your help. I have Mysaifu JVM 0.4.8 on hp iPAQ which > runs Windows Mobile 5.0. > > Look forward to hearing from you. > > Best, > > Jerry. > > > From: [email protected] > > To: [email protected] > > CC: [email protected] > > Subject: RE: [Tinyos-help] HELP: Toscomm.dll cannot be found > > Date: Sat, 28 Aug 2010 09:30:10 +0200 > > > > Hi Jerry, > > > > what kind of Java do you have on your PDA? What PDA do you have? In > any case you'd need JNI libraries compiled for your platform. If you > use JME (microedititon), you don't actually need the libraries, but > you'll have to change the code. I have done it once before, but I > currently don't have a test environment. I can give you more details > tomorrow, and maybe we can write a how-to for others. > > > > Cheers, > > Urs > > > > -original message- > > Subject: [Tinyos-help] HELP: Toscomm.dll cannot be found > > From: z qin <[email protected]> > > Date: 27/08/2010 22:52 > > > > Hello everyone, > > > > I am trying to connect TelosB mote with a PDA. When I run Listen > program, it always says toscomm and getenv JNI library not found. I > noticed that toscomm.dll is loaded in program > TOSCommLibraryLoader.java: System.loadLibrary("toscomm"). I changed > this sentence by replacing it with System.load(absolute.getPath()), as > follows: > > > > public class TOSCommLibraryLoader > > { > > static void load() > > { > > File absolute = new File("/My > Documents/Tinyos2.1/java/jni/toscomm.dll"); > > > > try > > { > > boolean exists = (new File(absolute.getPath())).exists(); > > if (exists) { > > // File or directory exists > > System.out.println("toscomm.dll exists"); > > } else { > > // File or directory does not exist > > System.out.println("toscomm.dll doesn't exist"); > > } > > > > //System.loadLibrary("toscomm"); > > System.load(absolute.getPath()); > > } > > catch( Throwable t ) > > { > > System.err.println( > > "The toscomm JNI library was not found.\n"+ > > "Check that your tinyos-tools package is installed and try\n"+ > > "rerunning tos-install-jni.\n"+ > > "Aborting."); > > System.exit(1); > > } > > } > > } > > > > The output is: toscomm.dll does exist, but " The toscomm JNI library > was not found..." > > I don't know why the System.load() fails. Is this because > toscomm.dll depends on other files? How to solve this problem? > > > > Thanks a lot. > > > > Jerry > > > > > > > > > > > > <<ATT00001..txt>> > > _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
