[Bug 266086] devel/cmake: cmake fails to find specific Java version when several Java versions are installed

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Nov 13 10:10:29 GMT 2022


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=266086

Adriaan de Groot <adridg at freebsd.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |adridg at freebsd.org

--- Comment #13 from Adriaan de Groot <adridg at freebsd.org> ---
After `find_package(Java)` you should be using `${Java_JAVA_EXECUTABLE}` or
`${Java_JAVAC_EXECUTABLE}`, which will be the full path of the relevant
executable: do not assume that they are in bin/ under the JAVA_HOME. Well, you
can, and it'd be right most of the time, but there is a specific, explicit,
variable for you to use.

The CMake code suggests that it does obey the CMake variable JAVA_HOME (if set)
and also the environment variable, so there's some experimentation to be done
between running-cmake-from-command-line and running-cmake-in-ports.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the kde-freebsd mailing list