Re: [Tinyos-help] help lesson 4 - The java class is not found: TestSerial
Hello everyone Thanks a lot to Michael, Varun, Janos, Andris and Prasanth for their quick responses. I finally get it.In fact, there were two problems. 1) My JNI files were not correctly installed. This was because : A) I had to modify the tos-install-jni file to change the uname and the group. * I obtained uname by typing $ uname in cygwin. For me it is CYGWIN_NT-6.1-WOW64. So at line 13 : [`uname` = "Darwin"] became [ `uname` = "CYGWIN_NT-6.1-WOW64" ] * I obtained the group by typing $ id in cygwin. For me the gid is 513. So at line 16 and 29 : install --group=SYSTEM became install --group=513 B) tos-install-jni tried to access the directory C:\Program Files (x86)\Java\jdk1.7.0_03\jre\bin to install getenv.dll and toscomm.dll. However, in windows the directory were "read-only". So, I changed permissions and tos-install-jni ran correctly. 2) I had to use the command java -classpath `cygpath -wp .:/cygdrive/c/cygwin/opt/tinyos-2.x/support/sdk/java/tinyos.jar` TestSerial to launch the application. Without the "." it wasn't looking in the current directory even if I were in the directory. Best regards, Tifenn Prasanth P a écrit : > Hi, > > I have faced the same problem and solved. One thing is you might not have > compiled your java files. Go inside /tinyos-x.x/support/sdk/java folder and > give command "make". > > If that itself is not working try following > (a) Download "java" tar file from the Tiny OS CVS repository: > http://tinyos.cvs.sourceforge.net/viewvc/tinyos/tinyos-2.x/support/sdk/java/ > (b) Untar and keep it in /opt/tinyos-2.1.0/support/sdk instead of > existing java folder there. > (c) Go inside the java folder in terminal and give "make" command. > > This is how i solved the issue. May be this will help you. > > On Tue, Mar 27, 2012 at 11:28 PM, Bíró, András wrote: > >> Hi, >> >> I think the windows CLASSPATH format is different: It uses ";" >> (semicolon) instead of ":" (colon), and "\" (backslash) instead of "/" >> (slash). >> >> Andris >> >> On Tue, Mar 27, 2012 at 4:35 PM, wrote: >> > >> > Dear all, >> > >> > I try to follow the tinyos-2.x tutorial in lesson 4: Mote-PC serial >> > Communication. I successfully compiled and installed the TestSerial >> > application on telosb mote. >> > >> > However, when I type in the TestSerial directory: >> > >> > java TestSerial >> > >> > I get: >> > >> > The java class is not found: TestSerial >> > >> > >> > The current directory and the tinyos.jar are included in the CLASSPATH >> > as it points to: >> > >> .:C:/cygwin/opt/tinyos-2.x/support/sdk/java/tinyos.jar:C:/cygwin/opt/tinyos-2.x/support/sdk/java >> > >> > The TestSerial.class and TestSerialMsg.class were generated in the >> > TestSerial directory. >> > >> > I am using Cygwin on Windows 7. >> > >> > I hope someone can help me. >> > Thanks a lot in advance. >> > Tifenn >> > >> > >> > >> > >> > >> > This message was sent using IMP, the Internet Messaging Program. >> > >> > >> > ___ >> > Tinyos-help mailing list >> > Tinyos-help@millennium.berkeley.edu >> > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help >> >> ___ >> Tinyos-help mailing list >> Tinyos-help@millennium.berkeley.edu >> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help >> > > > > -- > Regards > Prasanth.P > This message was sent using IMP, the Internet Messaging Program. ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] help lesson 4 - The java class is not found: TestSerial
Hi, I have faced the same problem and solved. One thing is you might not have compiled your java files. Go inside /tinyos-x.x/support/sdk/java folder and give command "make". If that itself is not working try following (a) Download "java" tar file from the Tiny OS CVS repository: http://tinyos.cvs.sourceforge.net/viewvc/tinyos/tinyos-2.x/support/sdk/java/ (b) Untar and keep it in /opt/tinyos-2.1.0/support/sdk instead of existing java folder there. (c) Go inside the java folder in terminal and give "make" command. This is how i solved the issue. May be this will help you. On Tue, Mar 27, 2012 at 11:28 PM, Bíró, András wrote: > Hi, > > I think the windows CLASSPATH format is different: It uses ";" > (semicolon) instead of ":" (colon), and "\" (backslash) instead of "/" > (slash). > > Andris > > On Tue, Mar 27, 2012 at 4:35 PM, wrote: > > > > Dear all, > > > > I try to follow the tinyos-2.x tutorial in lesson 4: Mote-PC serial > > Communication. I successfully compiled and installed the TestSerial > > application on telosb mote. > > > > However, when I type in the TestSerial directory: > > > > java TestSerial > > > > I get: > > > > The java class is not found: TestSerial > > > > > > The current directory and the tinyos.jar are included in the CLASSPATH > > as it points to: > > > .:C:/cygwin/opt/tinyos-2.x/support/sdk/java/tinyos.jar:C:/cygwin/opt/tinyos-2.x/support/sdk/java > > > > The TestSerial.class and TestSerialMsg.class were generated in the > > TestSerial directory. > > > > I am using Cygwin on Windows 7. > > > > I hope someone can help me. > > Thanks a lot in advance. > > Tifenn > > > > > > > > > > > > This message was sent using IMP, the Internet Messaging Program. > > > > > > ___ > > Tinyos-help mailing list > > Tinyos-help@millennium.berkeley.edu > > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > > ___ > Tinyos-help mailing list > Tinyos-help@millennium.berkeley.edu > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > -- Regards Prasanth.P ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] help lesson 4 - The java class is not found: TestSerial
Hi, I think the windows CLASSPATH format is different: It uses ";" (semicolon) instead of ":" (colon), and "\" (backslash) instead of "/" (slash). Andris On Tue, Mar 27, 2012 at 4:35 PM, wrote: > > Dear all, > > I try to follow the tinyos-2.x tutorial in lesson 4: Mote-PC serial > Communication. I successfully compiled and installed the TestSerial > application on telosb mote. > > However, when I type in the TestSerial directory: > > java TestSerial > > I get: > > The java class is not found: TestSerial > > > The current directory and the tinyos.jar are included in the CLASSPATH > as it points to: > .:C:/cygwin/opt/tinyos-2.x/support/sdk/java/tinyos.jar:C:/cygwin/opt/tinyos-2.x/support/sdk/java > > The TestSerial.class and TestSerialMsg.class were generated in the > TestSerial directory. > > I am using Cygwin on Windows 7. > > I hope someone can help me. > Thanks a lot in advance. > Tifenn > > > > > > This message was sent using IMP, the Internet Messaging Program. > > > ___ > Tinyos-help mailing list > Tinyos-help@millennium.berkeley.edu > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] help lesson 4 - The java class is not found: TestSerial
Tifenn: Your classpath looks weird: .:C:/cygwin/opt/tinyos-2.x/support/sdk/java/tinyos.jar:C:/cygwin/opt/tinyos-2.x/support/sdk/java Java on windows expects that the elements of the classpath are separated with semicolons, not colons. The correct classpath should be: .;C:/cygwin/opt/tinyos-2.x/support/sdk/java/tinyos.jar;C:/cygwin/opt/tinyos-2.x/support/sdk/java Janos On Tue, Mar 27, 2012 at 10:35 AM, wrote: > > Dear all, > > I try to follow the tinyos-2.x tutorial in lesson 4: Mote-PC serial > Communication. I successfully compiled and installed the TestSerial > application on telosb mote. > > However, when I type in the TestSerial directory: > > java TestSerial > > I get: > > The java class is not found: TestSerial > > > The current directory and the tinyos.jar are included in the CLASSPATH > as it points to: > .:C:/cygwin/opt/tinyos-2.x/support/sdk/java/tinyos.jar:C:/cygwin/opt/tinyos-2.x/support/sdk/java > > The TestSerial.class and TestSerialMsg.class were generated in the > TestSerial directory. > > I am using Cygwin on Windows 7. > > I hope someone can help me. > Thanks a lot in advance. > Tifenn > > > > > > This message was sent using IMP, the Internet Messaging Program. > > > ___ > Tinyos-help mailing list > Tinyos-help@millennium.berkeley.edu > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] help lesson 4 - The java class is not found: TestSerial
I don't use TOS2 so I can't easily look it up, but it may be that you need to include the full package name on the command line which might be something like: java net.tinyos.tools.TestSerial Java wants the fully specified package name for all classes it uses, even if you are in the directory that contains the class itself. And it treats package and directory trees identically, so you can imagine a jar file as an extension of the directory structure. MS tifenn.ra...@etu.utc.fr wrote: > Dear all, > > I try to follow the tinyos-2.x tutorial in lesson 4: Mote-PC serial > Communication. I successfully compiled and installed the TestSerial > application on telosb mote. > > However, when I type in the TestSerial directory: > > java TestSerial > > I get: > > The java class is not found: TestSerial > > > The current directory and the tinyos.jar are included in the CLASSPATH > as it points to: > .:C:/cygwin/opt/tinyos-2.x/support/sdk/java/tinyos.jar:C:/cygwin/opt/tinyos-2.x/support/sdk/java > > The TestSerial.class and TestSerialMsg.class were generated in the > TestSerial directory. > > I am using Cygwin on Windows 7. > > I hope someone can help me. > Thanks a lot in advance. > Tifenn > > > > > > This message was sent using IMP, the Internet Messaging Program. > > > ___ > Tinyos-help mailing list > Tinyos-help@millennium.berkeley.edu > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[Tinyos-help] help lesson 4 - The java class is not found: TestSerial
Dear all, I try to follow the tinyos-2.x tutorial in lesson 4: Mote-PC serial Communication. I successfully compiled and installed the TestSerial application on telosb mote. However, when I type in the TestSerial directory: java TestSerial I get: The java class is not found: TestSerial The current directory and the tinyos.jar are included in the CLASSPATH as it points to: .:C:/cygwin/opt/tinyos-2.x/support/sdk/java/tinyos.jar:C:/cygwin/opt/tinyos-2.x/support/sdk/java The TestSerial.class and TestSerialMsg.class were generated in the TestSerial directory. I am using Cygwin on Windows 7. I hope someone can help me. Thanks a lot in advance. Tifenn This message was sent using IMP, the Internet Messaging Program. ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help