contiki-os / contiki

The official git repository for Contiki, the open source OS for the Internet of Things
http://www.contiki-os.org/
Other
3.71k stars 2.58k forks source link

Contiki can't build cooja simulator #723

Closed TranLuongTuanAnh closed 10 years ago

TranLuongTuanAnh commented 10 years ago

I clone contiki OS from Github. now,i'm trying to run cooja sumulator by using command: ant run But,it's not work and error occurs in Visualizer.java below:

[javac] Compiling 157 source files to /home/tuananh/contiki/tools/cooja/build [javac]../contiki/tools/cooja/java/org/contikios/cooja/plugins/Visualizer.java:175: illegal start of type [javac] public Set selectedMotes = new HashSet<>();

[javac]../contiki/tools/cooja/java/org/contikios/cooja/plugins/Visualizer.java: 190:illegal start of type [javac] = new ArrayList<>(); .... and more same this errors Someone please help me fix this problem!!! Thanks you very much!!!

ejoerns commented 10 years ago

Seems your compiler complains about the diamond interface <>. It was introduced in Java SE 7. I guess you're using an older compiler. Try to switch to a Java 7 compiler.

Reference: http://docs.oracle.com/javase/7/docs/technotes/guides/language/type-inference-generic-instance-creation.html