Martin  
i set the CLASSPATH like u said
but still i get the same problem.

$ java TestSerial

shows this output... 
Exception in thread "main" java.lang.NoClassDefFoundError: TestSerial
Caused by: java.lang.ClassNotFoundException: TestSerial
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Could not find the main class: TestSerial.  Program will exit.

im doing this in the TestSerial directory.

Any other idea?
Thansk for you contribute




> Date: Thu, 8 Oct 2009 14:37:24 +0200
> From: martin.oster...@tu-ilmenau.de
> To: ze_espoge...@hotmail.com
> Subject: Re: [Tinyos-help] Problems with TestSerial
> 
> Hi Ze,
> 
> may be, you could try to set the CLASSPATH like this:
> 
> export CLASSPATH=.:$TOSROOT/support/sdk/java/tinyos.jar
> 
> You add the  current directory to the Classpath with the additional "."
> And the ":" is just a seperator for mutiple classpaths.
> 
> And, you should'nt compile the .java file by yourselve. Invoke the MIG and it
> should work.
> 
> Best,
> Martin
> 
> Quoting Zé Pedro Espogeira <ze_espoge...@hotmail.com>:
> 
> >
> > Hi to all
> >
> > although im able to compile and install TestSerial in a mote, im having
> > problems compiling TestSerial java application,  i think Classpath is 
> > correct
> > export CLASSPATH=$TOSROOT/support/sdk/java/tinyos.jar
> >
> > but when compiling whith javac comand this is errors are shown
> >
> > z...@ze-laptop:/opt/tinyos-2.1.0/apps/tests/TestSerial$ javac 
> > TestSerial.java
> > TestSerial.java:45: cannot find symbol
> > symbol  : class TestSerialMsg
> > location: class TestSerial
> >     this.moteIF.registerListener(new TestSerialMsg(), this);
> >                                      ^
> > TestSerial.java:50: cannot find symbol
> > symbol  : class TestSerialMsg
> > location: class TestSerial
> >     TestSerialMsg payload = new TestSerialMsg();
> >     ^
> > TestSerial.java:50: cannot find symbol
> > symbol  : class TestSerialMsg
> > location: class TestSerial
> >     TestSerialMsg payload = new TestSerialMsg();
> >                                 ^
> > TestSerial.java:69: cannot find symbol
> > symbol  : class TestSerialMsg
> > location: class TestSerial
> >     TestSerialMsg msg = (TestSerialMsg)message;
> >     ^
> > TestSerial.java:69: cannot find symbol
> > symbol  : class TestSerialMsg
> > location: class TestSerial
> >     TestSerialMsg msg = (TestSerialMsg)message;
> >                          ^
> > 5 errors
> >
> > You have any idea wht to do ?
> > Another question, is this the reason why when i do "java TestSerial" the
> > following happens?
> >
> > Exception in thread "main" java.lang.NoClassDefFoundError: TestSerial
> > ...
> > ...
> >
> > Im sorry to bring this question again but im still trying to solve and cant
> > find what more to do!
> > Thanks to all
> >
> >
> > _________________________________________________________________
> > Acesse o Portal MSN do seu celular e se mantenha sempre atualizado. Clique
> > aqui.
> >
> http://www.windowslive.com.br/celular/home.asp?utm_source=MSN_Hotmail&utm_medium=Tagline&utm_campaign=MobileServices200908
> 
> 
> 
> 
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
                                          
_________________________________________________________________
Você sabia que pode acessar o Messenger direto do seu Hotmail? Descubra como!
http://www.microsoft.com/brasil/windows/windowslive/products/tutoriais.aspx
_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to