ubuntu8.10下tinyos安装配置

ubuntu8.10下tinyos安装配置:

一、配置好安装好java6

二、安装tinyos

一、配置好安装好java6:

http://wiki.ubuntu.org.cn/Java安装配置
ubuntu下Java6安装配置

1) 安装jdk,jre
sudo apt-get install sun-java6-jre
sudo apt-get install sun-java6-jdk

2) 设置当前默认的java解释器
sudo update-alternatives --config java
执行后会出现类似如下的画面:
There are 2 alternatives which provide `java’.

Selection Alternative
———————————————–
1 /usr/bin/gij-wrapper-4.1
*+ 2 /usr/lib/jvm/java-6-sun/jre/bin/java


Press enter to keep the default[*], or type selection number:
输入前面的数字。如输入2,然后回车确定。

3) 配置JAVA环境变量
sudo gedit /etc/environment
在其中添加如下两行:
CLASSPATH=.:/usr/lib/jvm/java-6-sun/lib
JAVA_HOME=/usr/lib/jvm/java-6-sun

4) 添加配置
sudo gedit /etc/jvm
将文件中的"/usr/lib/jvm/java-6-sun"这一行填入到配置块的顶部

5) 安装浏览器的JAVA Plugin(可选)
sudo apt-get install sun-java6-plugin

二、安装tinyos:

1) 添加源

sudo gedit /etc/apt/sources.list

Add the following line at the bottom of sources.list

deb http://tinyos.stanford.edu/tinyos/dists/ubuntu hardy main

2) 更新源
sudo apt-get update

3) 安装tinyos
sudo apt-get install tinyosXXX

4) 把下面加入到~/.bashrc或者~/.profile文件里

sudo gedit ~/.bashrc

add the followings:

#Sourcing the tinyos environment variable setup script
source /opt/tinyos-2.1.XXXXX/tinyos.sh
export CLASSPATH=$TOSROOT/support/sdk/java/tinyos.jar:.
     /opt/tinyos-2.1.1/support/sdk/java/tinyos.jar

Save and exit the .bashrc file Next run the command

source ~/.bashrc


Run the following to prevent errors with java apps

sudo tos-install-jni

If you are getting any errors running make on the nesC files run the following...

sudo apt-get install g++
sudo apt-get install python2.5-dev


如果出现以下问题:
/opt/tinyos-2.1.0/support/sdk/java/net/tinyos/message/Message.java:84:
cannot find symbol
symbol : class SerialPacket
location: class net.tinyos.message.Message
private SerialPacket serialPacket;
^
...


可以将/opt/tinyos-2.1.0/tinyos.sh中
CLASSPATH=$CLASSPATH:$TOSROOT/support/sdk/java
改成
CLASSPATH=$CLASSPATH:$TOSROOT/support/sdk/java/tinyos.jar
试一试

python有问题,记得安装python-dev,并且export PYTHONPATH=/opt/tinyos-2.1.0/support/sdk/python

如果你有eclipse,而且想用java-6-sum,需要做下面两步
sudo gedit /etc/jvm
将文件中的"/usr/lib/jvm/java-6-sun"这一行填入到配置块的顶部

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值