Java not found

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Java not found

szukw000
cmake-3.12.4 did find the correct version:

-- Found Java: /usr/lib64/java/bin/java (found version "11.0.1")

But the cmake Module FindJava.cmake fails with this warning:

-----------------------------------------------------------
warning: [options] bootstrap class path not set in conjunction with
-source 5
error: Source option 5 is no longer supported. Use 6 or later.
error: Target option 1.5 is no longer supported. Use 1.6 or later.
make[2]: *** [src/bin/jpip/CMakeFiles/OPJViewerJar.dir/build.make:70:
bin/opj_jpip_viewer.jar] Error 2
make[1]: *** [CMakeFiles/Makefile2:680:
src/bin/jpip/CMakeFiles/OPJViewerJar.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
-----------------------------------------------------------

Reading FindJava.cmake I found that the highest JAVA version seems
to be 1.9.x . And too for cmake-3.13.0-rc3 .

winfried

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Java not found

Roger Leigh
On 20/11/2018 01:02, szukw000 wrote:

> cmake-3.12.4 did find the correct version:
>
> -- Found Java: /usr/lib64/java/bin/java (found version "11.0.1")
>
> But the cmake Module FindJava.cmake fails with this warning:
>
> -----------------------------------------------------------
> warning: [options] bootstrap class path not set in conjunction with
> -source 5
> error: Source option 5 is no longer supported. Use 6 or later.
> error: Target option 1.5 is no longer supported. Use 1.6 or later.

Java /was/ found correctly.  The problem is that Java 11 is not capable
of compiling Java 5 (or 6, or 7) sources.  Java 11 can only compile Java
8+ sources.

You need to either

- use an older JDK
- update the source and target versions to a minimum of 1.8

Since all the JDK versions supporting 1.5 are long out of support, I'd
recommend the latter.  You might need some small source adjustments to
fix up any obsolete feature removals or behaviour changes.


Regards,
Roger
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake