[Tinyos-help] java compile errors in tinyos-2.x

Ryan Aures raures at gmail.com
Tue Aug 15 07:31:42 PDT 2006


Michael,

That worked!  My java directory now compiles correctly, however I am still
getting this same error for Listen:

$ java net.tinyos.tools.Listen
Exception in thread "main" java.lang.NoClassDefFoundError:
net/tinyos/tools/Listen

I get this error for SerialForwarder as well.  Any ideas?  Thank you for
your help so far.

Ryan



On 8/14/06, Michael Schippling <schip at santafe.edu> wrote:
>
> oops....maybe it's a semi...  ".;..." I can never remember which/when.
>
> But you already have the support dir in the path so I guess that isn't it.
> Or not...it may be that java doesn't deal with the cygwin bait-n-switch
> /opt syntax, possibly you need to use /cygdrive/cygwin/opt or something.
>
> Anyway you got me going so I had to try it,
> on Windows XP with jdk 1.4.2 in the dir at the root of the question.
>
> With no classpath environment set:
>    enfield:java [118] javac Listen.java
>    error: cannot read: Listen.java
>    1 error
>
> Then with a forced CP on the cmdline:
>    enfield:java [119] javac -classpath .  Listen.java
>    error: cannot read: Listen.java
>    1 error
>
> Then with the full path but no CP:
>    enfield:java [120] javac  net/tinyos/tools/Listen.java
>    net/tinyos/tools/Listen.java:35: package net.tinyos.packet does not
> exist
>    import net.tinyos.packet.*;
>    ^
>    net/tinyos/tools/Listen.java:36: package net.tinyos.util does not exist
>    ...
>
> Then with the magic CP AND the full path:
>    enfield:java [116] javac -classpath .  net/tinyos/tools/Listen.java
> VOILA!, it works for me...
>
> oy
> MS
>
> Ryan Aures wrote:
> > This is what my bash file looks like for cygwin:
> >
> > TOSROOT="opt/tinyos-2.x"
> > export TOSROOT
> > TOSDIR="$TOSROOT/tos"
> > export TOSDIR
> > CLASSPATH="/opt/tinyos-2.x/support/sdk/java"
> > export CLASSPATH="$CLASSPATH"
> > MAKERULES=$TOSROOT/support/make/Makerules
> > export MAKERULES
> >
> > I tried adding .: before $CLASSPATH but it didnt change anything
> >
> > Ryan
> >
> >
> > On 8/13/06, *Michael Schippling* <schip at santafe.edu
> > <mailto:schip at santafe.edu>> wrote:
> >
> >     I think this is a symptom of not having /opt/tinyos-2.x
> /support/sdk/java
> >     in your CLASSPATH. Or more to the point, since you are in that
> >     directory,
> >     you need to have "." in the CP. Something like:
> >
> >     export CLASSPATH=".:[other dirs & jars]"
> >
> >     MS
> >
> >     Ryan Aures wrote:
> >      > Hello,
> >      >
> >      > I am trying to run Listen in tinyos-2.x on a Windows 2000
> >     machine.  When
> >      > I run 'make' in the support/sdk/java directory,
> >      > I got a lot of errors, these are just the errors I get from
> trying to
> >      > make the tools directory:
> >      >
> >      >
> >
> ------------------------------------------------------------------------
> >
> >      > user at computer <mailto:user at computer <mailto:user at computer>>
> >      > /opt/tinyos-2.x/support/sdk/java/net/tinyos/tools
> >      > $ make
> >      > ... /opt/tinyos-2.x/support/sdk/java/net/tinyos/tools
> >      > javac Listen.java
> >      > Listen.java:36: package net.tinyos.packet does not exist
> >      > import net.tinyos.packet.*;
> >      > ^
> >      > Listen.java:37: package net.tinyos.util does not exist
> >      > import net.tinyos.util.* ;
> >      > ^
> >      > Listen.java:38: package net.tinyos.message does not exist
> >      > import net.tinyos.message.* ;
> >      > ^
> >      > Listen.java:43: cannot find symbol
> >      > symbol  : class PacketSource
> >      > location: class net.tinyos.tools.Listen
> >      >         PacketSource reader;
> >      >         ^
> >      > Listen.java:53: cannot find symbol
> >      > symbol  : variable BuildSource
> >      > location: class net.tinyos.tools.Listen
> >      >           reader = BuildSource.makePacketSource();
> >      >                    ^
> >      > Listen.java:56: cannot find symbol
> >      > symbol  : variable BuildSource
> >      > location: class net.tinyos.tools.Listen
> >      >           reader = BuildSource.makePacketSource (source);
> >      >                    ^
> >      > Listen.java:64: cannot find symbol
> >      > symbol  : variable PrintStreamMessenger
> >      > location: class net.tinyos.tools.Listen
> >      >           reader.open(PrintStreamMessenger.err );
> >      >                       ^
> >      > Listen.java:67: cannot find symbol
> >      > symbol  : variable Dump
> >      > location: class net.tinyos.tools.Listen
> >      >             Dump.printPacket(System.out, packet);
> >      >             ^
> >      > 8 errors
> >      > make: *** [Listen.class] Error 1
> >      >
> >
> ------------------------------------------------------------------------
> >      >
> >      > I get similar "cannot find symbol" errors(more) when making java
> >     alone,
> >      > and when I try to run java net.tinyos.tools.Listen I get:
> >      >
> >      > $ java net.tinyos.tools.Listen
> >      > Exception in thread "main" java.lang.NoClassDefFoundError:
> >      > net/tinyos/tools/Listen
> >      >
> >      > Can anyone help with this problem?
> >      > Thanks,
> >      >
> >      > Ryan Aures
> >      > University of Rochester
> >      >
> >      >
> >      >
> >
> ------------------------------------------------------------------------
> >
> >      >
> >      > _______________________________________________
> >      > Tinyos-help mailing list
> >      > Tinyos-help at Millennium.Berkeley.EDU
> >     <mailto:Tinyos-help at Millennium.Berkeley.EDU>
> >      >
> >
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20060815/d64f00d0/attachment.html


More information about the Tinyos-help mailing list