HEADS-project / training

Training material to get started with the HEADS technologies
10 stars 16 forks source link

About Reading ThingML model #104

Closed simonnathan closed 8 years ago

simonnathan commented 8 years ago

To whom it may concerned,

Thanks for taking time to read my post. I am trying to do somework on extending ThingML for my purposes, and noticed that there is a project about how to read ThingML model. That's very nice but I have to say that it doesn't work for me. I mean, whenever I run "mvn clean install", I got some error message. Please see the attached files and please figure out how to fix that. Thanks!

I'm looking forward to your reply. error info.txt

ffleurey commented 8 years ago

Hello,

From your error message it seems that you are trying to compile with an old version of Java ('error: for-each loops are not supported in -source 1.3'). ThingML requires at least Java 7. I hope this helps. Cheers, Franck

simonnathan commented 8 years ago

But it seems that the error itself has nothing to do with maven/ java version. Maven home: /usr/share/maven Java version: 1.7.0_95, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "3.13.0-83-generic", arch: "amd64", family: "unix"

Regards, Simon

ffleurey commented 8 years ago

Hello! For some reason your compiler still wants the source to comply with Java 1.3. You can add source and target in the POM file to force maven and the compiler to accept Java 1.7 (or 1.8). Check the discussion here http://stackoverflow.com/questions/14043042/compiling-java-7-code-via-maven for how to do it. Cheers, Franck.

brice-morin commented 8 years ago

Also, make sure you have a proper JDK, not just a JRE. Maven will not work properly with JRE.