Zhuo, The $CLASSPATH variable for your shell (probably bash) need to be set up to include TinyOS's directories every time you run it (i.e. open up a terminal window), so you need to either: 1) Run the script that Joao references every time you open up a new terminal, which can be done by modifying your ~/.bashrc file to run the tinyos.sh script that Joao cut-and-pasted here 2) Permanently add these variables to your system, which could possibly muck things up and become unreliable.
In short, cut and paste Joao's code into a new file, and add the full path to that file (for example, on my virtual machine, /opt/tinyos/tinyos.sh) to ~/.bashrc. Then open up a new terminal and, and your environment variables should be set up correctly (check them by doing "echo $CLASSPATH" or whichever other one you'd need.) -Andrew 2011/6/28 João Gonçalves <joao.m.goncal...@ist.utl.pt> > Didn't you source from a script like this? > > #! /usr/bin/env bash > # Here we setup the environment > # variables needed by the tinyos > # make system > > echo "Setting up for TinyOS" > export TOSROOT= > export TOSDIR= > export MAKERULES= > > TOSROOT="/opt/tinyos-2.x" > TOSDIR="$TOSROOT/tos" > CLASSPATH=$CLASSPATH:$TOSROOT/support/sdk/java/tinyos.jar > PYTHONPATH=.:$TOSROOT/support/sdk/python:$PYTHONPATH > MAKERULES="$TOSROOT/support/make/Makerules" > > export TOSROOT > export TOSDIR > export CLASSPATH > export PYTHONPATH > export MAKERULES > export PATH=$PATH:/opt/msp430-gcc-4.4.5/bin > > > On Tue, Jun 28, 2011 at 2:54 AM, 陈卓 <czx...@gmail.com> wrote: > >> Hi, >> >> I ran $ tos-check-env on my computer and there are several warnings shown >> up. One of them says "CLASSPATH may not include ...". Would you please help >> me on setting the CLASSPATH? >> >> >> Thanks, >> >> Zhuo Chen >> -- >> Lab of Next Generation Network >> Dept. of Electronic Engineering >> Tsinghua University >> Beijing, 100084, China >> e-mail: chenzhu...@mails.tsinghua.edu.cn >> cell: 15120003979 >> >> >> _______________________________________________ >> 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 > -- Andrew Sabelhaus Cell: (301) 807-9842 andrew.sabelh...@gmail.com
_______________________________________________ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help