Mote-PC串口通信课上关于tinyos的一些问题

Some problems on tinyos on the lesson Mote-PC serial communication

我现在在学习 tinyos 时遇到了一些问题,可能是 java。

还有一些关于我的 java 和 tinyos.sh

的设置
 //.bashrc
    # Start TinyOS environment pathing  
    export TOSROOT=/opt/tinyos-2.1.2  
    export TOSDIR=$TOSROOT/tos  
    export CLASSPATH=$TOSROOT/support/sdk/java/tinyos.jar:.$CLASSPATH  
    export MAKERULES=$TOSROOT/support/make/Makerules  
    export PATH=/opt/msp430/bin:$PATH  
    source /opt/tinyos-2.1.2/tinyos.sh  
    # End TinyOS pathing  

export JAVA_HOME=/usr/local/java/jdk1.8.0
export JRE_HOME=${JAVA_HOME}/jre 
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH

# TinyOS 2.1.2 Configuration Guide  
# Here we setup the environment  
# variables needed by the tinyos   
# make system  

echo "Setting up for TinyOS 2.1.2"  
export TOSROOT="/opt/tinyos-2.1.2" 
export TOSDIR="$TOSROOT/tos"  
export MAKERULES="$TOSROOT/support/make/Makerules"   
export PYTHONPATH=$PYTHONPATH:$TOSROOT/support/sdk/python
exportCLASSPATH=
$CLASSPATH:$TOSROOT/support/sdk/java:.:$TOSROOT/support/sdk/java/tinyos.jar

如果有什么建议,请告诉我。

你的问题主要出在你的类路径上,试试:

CLASSPATH="$TOSROOT/support/sdk/java/tinyos.jar:$TOSROOT/support/sdk/java:$TOSROOT
        /support/sdk/java/net/tinyos:{Insert_folder_where_NesC_Is}/nesc-1.3.4/tools:."

上面的类路径几乎涵盖了您可能需要的所有 java 相关内容。