Your setup should work as is (without any need for extracting 
tinyos.jar). What is the output of the following commands?

echo $CLASSPATH
jar -tf /opt/tinyos-2.1.0/support/sdk/java/tinyos.jar | grep SerialForwarder

The second command should be on a single line. You might want to 
copy/past it.

Cheers,
Urs


Abhishek Phadnis wrote:
> hey
> sorry i didnt see the last mail..if i extract contents of the tinyos.jar i
> should be able to run the program right?? as of now i dont have
> the .class files in the folder
> 
> 
> /net/tinyos/sf
> 
> 2009/4/30 Urs Hunkeler <[email protected]>
> 
>> Hi Abhishek,
>>
>> Did you try the "echo $CLASSPATH" variable to see whether the variable is
>> properly set? It happened to me many times that somehow the .bashrc (the
>> leading point is important) did not properly execute.
>>
>> If you have the tinyos.jar file, then you should be fine. You can list the
>> contents of the tinyos.jar file with the command:
>>
>> jar -tf /opt/tinyos-2.1.0/support/sdk/java/tinyos.jar
>>
>> Make sure you that the tinyos.jar file contains the following file (it does
>> on my system):
>>
>> net/tinyos/sf/SerialForwarder.class
>>
>>
>> Cheers,
>> Urs
>>
>>
>> Abhishek Phadnis wrote:
>>
>>> export TOSROOT=/opt/tinyos-2.1.0/
>>> export TOSDIR=$TOSROOT/tos
>>> export CLASSPATH=$TOSROOT/support/sdk/java/tinyos.jar
>>> export MAKERULES=$TOSROOT/support/make/Makerules
>>> export PATH=/opt/msp430/bin:$PATH
>>> export CLASSPATH="$CLASSPATH;."
>>>
>>> messed up the last mail.. this seems fine right? .jar file is included..
>>>
>>> 2009/4/30 Abhishek Phadnis <[email protected]>
>>>
>>>  hey urs,
>>>> this is what my bashrc looks like
>>>>
>>>> export TOSROOT=/op
>>>>
>>>> opt/tinyos-2.1.0/
>>>> export TOSDIR=$TOSROOT/tos
>>>> export CLASSPATH=$TOSROOT/support/sdk/java/tinyos.jar
>>>> export MAKERULES=$TOSROOT/support/make/Makerules
>>>> export PATH=/opt/msp430/bin:$PATH
>>>> export CLASSPATH="$CLASSPATH;."
>>>>
>>>> i think i m missing .class file..have the uncompiled versions..how do i
>>>> go
>>>> about compiling it? i guess its the same problem with the
>>>> listen application..
>>>>
>>>> thanks
>>>>
>>>> abhishek
>>>>
>>>> 2009/4/30 Urs Hunkeler <[email protected]>
>>>>
>>>> Hey,
>>>>
>>>>> I was not talking about repositories, I'm sure you have them.
>>>>>
>>>>> You need the CLASSPATH environment variable. To see the contents of this
>>>>> variable, you can type the command:
>>>>>
>>>>> echo $CLASSPATH
>>>>>
>>>>> This variable should include a path to either the TinyOS class files or
>>>>> to
>>>>> tinyos.jar. On my system (Mac OS X), the CLASSPATH variable looks like:
>>>>>
>>>>> .:/opt/tinyos-2.x/support/sdk/java
>>>>>
>>>>> Typically, the classpath variable is set in the tinyos.sh script, which
>>>>> should be called automatically from your .bashrc or .profile startup
>>>>> script.
>>>>> I suspect that it is not called on your system, or that your system does
>>>>> not
>>>>> call it with the 'source' command (the source command calls it in the
>>>>> same
>>>>> context as the current shell, thus ensuring that the environment
>>>>> variables
>>>>> are set for the shell and not only for the subprocess of the script).
>>>>>
>>>>> So, check that your CLASSPATH variable is set properly. If it is, you
>>>>> might want to check that the net/tinyos/sf/SerialForwarder.class file is
>>>>> present (maybe you only have the uncompiled source files). If it still
>>>>> does
>>>>> not work, send the CLASSPATH value to the mailing list to see whether
>>>>> anybody can spot a problem with it. If the CLASSPATH variable is not
>>>>> properly set, try the command
>>>>>
>>>>> source /opt/tinyos-2.1.x/tinyos.sh
>>>>>
>>>>> (you might have to substitute the proper path). If it works then, you'll
>>>>> have to check how to automatically call tinyos.sh, otherwise I have no
>>>>> clue
>>>>> about your particular problem.
>>>>>
>>>>>
>>>>> Cheers,
>>>>> Urs
>>>>>
> 

_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to