[Tinyos-help] Environment variables setting for TinyOS 1.1.15 on Windows

Michael Schippling schip at santafe.edu
Wed Jun 3 09:12:31 PDT 2009


There are two separate but equal paths...

CLASSPATH is used by Java to find classes and jar files,
you seem to be on the right "path" to getting that set correctly.

PATH is used by the bash shell (and internal Widows executor) to
find executable programs. Most of the complaints in your original
message, e.g., "Warning: No ncc in current path", are from not
having this set correctly -- unless of course there really is no
"ncc" installed...

This may help a bit:
     http://docs.tinyos.net/index.php/Java_cygwin

as well as googling both CLASSPATH and PATH for more details on
how they work. And try "man bash" for details on the shell itself.

You can see variable values by typing "echo $PATH", etc, or "env"
to see everything. export VAR="stuff" will set a variable in
the current shell. Just to make things interesting, directories
in the cygwin bash shell PATH variable need to be referenced
relative to the cygwin install with colon ':' separators like this:
     PATH=/usr/X11R6/bin:/cygdrive/c/JAVA/jdk1.5.0_16/bin
and in CLASSPATH relative to the windows drive nomenclature with
semicolon ';' separators:
     CLASSPATH=C:/cygwin/opt/moteiv/tools/java;C:/cygwin/opt/someother.jar

I have heard that TOS does not play well with Vista so you may
be on your own hacking through the problems.

MS

bharat naik wrote:
> Hi all,
> 
>        I had blindly followed the instructons on the online webpages. I 
> removed the previously defined environment variables. I would like to 
> mention that my files are in
> *C:\Program Files\cygwin rather than C:\cygwin*. If I type *echo 
> $CLASSPATH*, in the bash shell it displays the correct path. However, if 
> I do a *cd $CLASSPATH* in the bash shell, I get: *C:\Program: No such 
> file or directory. *Is it due to the space in Program Files. Is there a 
> way around this, since I'm not able to paste it anywhere else due to 
> file permissions.* *
> 
> What I have done now is type the following in the bash shell:
> 
> *export TOSROOT = /opt/tinyos-1.x
> export TOSDIR=$TOSROOT/tos
> export MAKERULES=$TOSROOT/tools/make/Makerules*
>  and added *CLASSPATH     
> C:\ProgramFiles\cygwin\opt\tinyos-1.x\tools\java* in the system 
> variables (in Environment variables).
> 
> However the previous errors still persist including CLASSPATH 
> environment variable doesn't exist. All of them.
> 
> Also, I am not able to figure out what to add in the Path variable. I 
> have both *jdk 1.6.0 *(C:\Program Files\Java\jdk1.6.0) and 
> *j2sdk1.4.2_19*(C:\j2sdk1.4.2_19) and *j2re1.4.2_19 *is in C:\Program 
> Files\Java\j2re1.4.2_19. Which of this should I add?
> 
> 
> 
> Thanks and regards,
> Bharat Naik.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


More information about the Tinyos-help mailing list