第一步安装eclipse和floodlight
apt-get -y install build-essential default-jdk ant python-dev eclipse
git clone git://github.com/floodlight/floodlight.git
第二步进入到floodlight的目录编译。必须安装ant才能编译,使用apt-get命令安装。
cd floodlight
ant
ant eclipse
注:必须编译才能在eclipse导入,否则不能进行导入,出现no projects are found to import!
第三步打开eclipse进行导入
File --> Import --> General --> Existing Projects into Workspace --> Select root direction 找到clone出来的floodlight文件夹,选中 --> finish
然后就是运行配置设置
右键floodlight项目 --> Run As --> Run Configuration --> 右键Java Application --> new --> 名字自己命名,Project选择floodlight,Main选择net.floodlightcontroller.core.Main,最后点击 Apply