-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Which minimal version of java for Leshan 2.0.0 ? #924
Comments
Regarding eclipse-californium/californium#1159 (comment), we currently lean towards for java8 as minimal version. |
Logback 1.3.0 which could be need for #568 need java8 at runtime. |
In the https://github.com/eclipse/leshan/wiki/F.A.Q.#can-i-use-leshan-with-android- links "leshan-android-demo" and "LwM2MDemoClientAndroid" are not working. It seems to no one actively support android with leshan. |
I fixed links (it seems those projects are still available on github but through some other links 😬)
As said, in F.A.Q. : Developers team never tested Leshan with android at least AFAIK. |
Java 8 will be supported for a long time (2026/2030) : For Android this is not crystal clear but I guess java 8 should be OK. During development and only if new API is needed, we could also change the API level to target to a more recent version of android. |
So since #1159 is integrated we are building with java8. |
Now we can use syntax sugar from java8 😄 I'm very glad for this 😁. |
For syntax sugar, I guess yes but about the java 8 API, you could be limited by the Android level API set. :) Coding a reusable library is like living in the past 😬 |
But I don't see any mechanism preventing us to use java8 API. How we ensure that we don't break android API? |
This should be done by |
Going forward, is there anywhere that we can easily find the minimal version of Java within the codebase? I noticed on https://ci.eclipse.org/leshan/job/leshan/ that Java8 is still being used, so I'll use Java8. The README.md would benefit from either a reference to Java8 or a reference to a place to check for the required Java version. (The required mvn version would be good too actually.) Thanks! |
Oops actually I'm using the 1.4.2 jars from https://search.maven.org/search?q=g:org.eclipse.leshan%20AND%20v:1.4.2%20AND%20!a:leshan to set up some local demos. So based off https://ci.eclipse.org/leshan/job/leshan-1.x/ I'm guessing that I should actually be using Java 7? |
Although Java 7 appears to be EOL. Looks like things are in a bit of a purgatory between Leshan 1.4.2 and 2.0.0... |
OK I will add this in the README. But I don't understand why you search on Jenkins to know the minimal version, if you find this issue #924.
Note this is not the required Java version but the minimal one.
For this one, I'm not so sure, the Leshan maven build should tell you if you are using a too old version of mvn. By the way no need to be a maven expert to check java minimal version too :
No you can just use the Java version of your choice, I must confess that I'm a bit confuse if you want to create demo based on Leshan, just create your maven project using any JDK you want and add Leshan as dependency...
And so what ? When Leshan 1.x was out (mid-2020) Java 7 was still maintained. We will not change minimal java version for minor version ...
Could you elaborate what is the point here ? |
@sbernard31 : Thanks for adding that information to the README. The first comment said "Leshan 1.x is compatible with java7" but it didn't say anything else and the rest of the thread was about Leshan 2.x. That first comment was also 2 years old, so I wasn't sure if it still applied. I use a few other projects that can't support newer versions of Java, so based on the wording I thought it might not be able to use newer versions of Java. I've had similar problems with Maven versions in the past too, although that was quite a few years ago now. You can probably guess that I don't use Java often. -- I'm not very familiar with pom files and Maven plugins, but I did see that leshan/build-config/pom.xml, but only in the master branch. It didn't exist in the 1.x branch. I looked at https://github.com/eclipse/leshan/blob/1.x/pom.xml but I didn't really understand how the different references to 1.7 and 1.8 applied. -- At https://github.com/eclipse/leshan#compile-leshan--run-demos you have the following line: "mvn clean install" At the moment, I'm just downloading the already compiled JARs, but I thought it might be interesting to tweak the demo and compile it, so that's why I was wondering about the Maven version. I figured at this point it made more sense than to use trial and error. -- As for my comments about Java 7 being EOL and "purgatory", that was just a misunderstanding on my part. Your other comments have clarified everything and helped me to understand. No worries at all. |
I'm used to projects like Keycloak that usually tell you which Java version to use in the Getting Started (e.g. https://www.keycloak.org/getting-started/getting-started-zip) So I appreciate the update to the README. And I appreciate the Leshan project! Thanks to you folk and Sierra Wireless in general. I work on an IoT project that pre-dates the LwM2M protocol, but we're getting some new components with embedded LwM2M clients, so looking to test out that client functionality, and the Leshan client demo and Leshan server demo have been really helpful for testing that hardware. I'm still thinking about how we'll use Leshan in production. I figure we'll probably wrap it with an API interface that lets us integrate it into existing user consoles, especially since we'll only be using a very small set of LwM2M functionality. I'll probably have more questions in the future, so merci beaucoup d'avance! |
Leshan 1.x is compatible with java7.
Main reason of that was to support (or at least try to support) android.
With the development of the new version 2.0.0, the question is:
Should we still target java7 or a more recent version of java ?
Californium project wonders the same thing.(eclipse-californium/californium#1159 (comment))
Feedback from community would be strongly appreciated. 🙏
The text was updated successfully, but these errors were encountered: