-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
JDK7/OpenJDK support #15
Comments
JDK 7 has been end of life since April, 2015. OpenJDK 8 has been available since 2014. Is there a reason you are still using 7? |
@vonnieda I'm developing project which will be working in the hosting environment I have little control, so I need maximum flexibility. In my experience of developing such java server-side projects, large IT companies prefer stable and open versions of SDK which come standard with Linux OS. Current widely used server linux distro CentOS 7 includes OpenJDK 7 by default. Anyway, I don't think your bindings are using any of Java 8 features and supporting JDK7 for you is just a matter of specifying -source and -target build keys when packaging it. It is common practice for libraries to require only previous version of platform to increase library's availability. |
@virl As I said, JDK 7 was end of lifed in April of 2015. That means it is not longer recommended for new applications. The current JDK is 8 and has been for for over 2.5 years. JDK 9 is about to be released and then we'll see 8 end of lifed. The difficulty in doing this is that I don't control the build scripts used by OpenCV to build the OpenCV jar. I run the standard OpenCV build process and then bundle the generated jar. For me to switch the source and target for that jar I'd have to patch the OpenCV build scripts which I don't want to do. If you can suggest an easy way to do this, or better yet, provide a pull request, I'm willing to include it. |
@vonnieda What you saying about end-of-life is true for client apps, not libraries. Most libraries (even latest versions) on Maven still use JDK 7 if they're not requiring Java 8 features. As for build process, the JDK source and target version is specified in pom.xml. Usually you do not need to change anything else (and don't need to install JDK7 to build it, of course). |
@virl OpenCV does not use Maven to build, it uses Ant. I do not control the build scripts for the OpenCV part of the build, only the wrappers. So to do this we would have to patch the OpenCV build scripts before building OpenCV. Note that my pom.xml already does specify 1.7 https://github.com/openpnp/opencv/blob/develop/pom.xml#L146 but that is not the one that matters. As I said, if you are willing to provide a pull request to fix this I am happy to include it. |
@vonnieda Ok thanks for reply. |
It seems that currently published Maven artifact for this project is built using JDK8 and thus doesn't work on JDK7 or OpenJDK.
It gives following error when project compiled with it tries to use OpenCV classes on JDK7:
The rest of the same app (other classes, not related to OpenCV bindings) work on that JDK just fine.
The text was updated successfully, but these errors were encountered: