I’m wondering why the build process is still insisting on using Java 1.7 to build the OH1 addons.
Is there a reason we can’t start using 1.8?
I’m wondering why the build process is still insisting on using Java 1.7 to build the OH1 addons.
Is there a reason we can’t start using 1.8?
I think it’s on the way: https://github.com/eclipse/smarthome/issues/2926
Is this something that is essential to setting up a build environment?
The getting started page on that subject explicitly mentions that Oracle JDK 8 is a requirement.
I just attempted to follow these instructions and I ended up with an unworkable setup that contains hundreds of “A class file was not written. The project may be inconsistent, if so try refreshing this project and building it
” errors for groovy files.
I realize that JDK != JRE, but this seems confusing.
This should not happen, the getting started should work. Maybe you could uninstall and try again?
To tidy up the confusion: Yes, JDK 8 is required, but currently Java 8 features like lambdas cannot be used in the code because the source level is set to Java 7 (this is what @namraccr meant) . The JDK supports building older versions of the java language and this feature is also used by OpenHab so that it’s backwards-compatible.
I guess that it should not, but it does, even after reinstalling everything from scratch.
This thread seems to be getting off topic, so I’ll try again today and if I can’t get it to work I’ll start a new dedicated thread for support with this issue.
Yes, JDK 8 is required, but currently Java 8 features like lambdas cannot be used in the code because the source level is set to Java 7
Not sure this is the case? See this commit
So I believe now at least the openHAB v1 addons are built with jdk8, targeting java8. Or am I missing something?
Best,
Sami
No, you’re right, I missed that commit. This also applies to OpenHab 2 addons. Only ESH is pending.