The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=14032 
====================================================================== 
Reported By:                Pol Monsó Purtí
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   14032
Category:                   Modules
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2013-03-20 10:42 EDT
Last Modified:              2013-03-20 10:42 EDT
====================================================================== 
Summary:                    Find_Java fails to prioritize JAVA_HOME
Description: 
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.

Steps to Reproduce: 
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

Additional Information: 
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"
[...]
)

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2013-03-20 10:42 Pol Monsó PurtíNew Issue                                    
======================================================================

--

Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to