MantisBT - CMake
View Issue Details
0014032CMakeModulespublic2013-03-20 10:422016-06-10 14:31
Pol Monsó Purtí 
Kitware Robot 
normalminoralways
closedmoved 
WindowsWIndows 7WIndows 7
CMake 2.8.10.2 
 
0014032: Find_Java fails to prioritize JAVA_HOME
FindJava.cmake chooses the vewest version of Java instead of the one pointed by the environment variable JAVA_HOME.

If there are several versions and the user targets a particular one, there's no way to tell cmake.
1. install several versions of jdk.
2. set JAVA_HOME to the oldest one
3. Run a cmake with Find(Java) and check the output
I could fix this by changing FindJava.cmake

from

set(_JAVA_HINTS
"[HKEY...]/bin"
[...]
$ENV{JAVA_HOME}/bin
)

to

set(_JAVA_HINTS
$ENV{JAVA_HOME}/bin
"[HKEY...]/bin"
[...]
)
No tags attached.
Issue History
2013-03-20 10:42Pol Monsó PurtíNew Issue
2016-06-10 14:28Kitware RobotNote Added: 0042254
2016-06-10 14:28Kitware RobotStatusnew => resolved
2016-06-10 14:28Kitware RobotResolutionopen => moved
2016-06-10 14:28Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0042254)
Kitware Robot   
2016-06-10 14:28   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.