[cmake-developers] [CMake 0011676]: find_package(Java) gives warning "regex not supported"

Mantis Bug Tracker mantis at public.kitware.com
Mon Jan 10 12:43:57 EST 2011


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=11676 
====================================================================== 
Reported By:                Gerhard Grimm
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   11676
Category:                   Modules
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2011-01-10 12:43 EST
Last Modified:              2011-01-10 12:43 EST
====================================================================== 
Summary:                    find_package(Java) gives warning "regex not
supported"
Description: 
The system has HP's JRE installed in /opt/java6. The environment variable
JAVA_HOME is set accordingly. When calling

find_package(Java REQUIRED)

in a CMakeLists.txt file, the following warning is issued:

  regex not supported: java version "1.6.0.06"

  Java(TM) SE Runtime Environment (build
  1.6.0.06-jinteg_20_jan_2010_05_50-b00)

  Java HotSpot(TM) Server VM (build 14.3-b01-jre1.6.0.06-rc1, mixed mode).
  Please report
Call Stack (most recent call first):
  CMakeLists.txt:171 (find_package)


-- Java version .. configured successfully!
-- Found Java: /opt/java6/bin/java (found version "..")


Steps to Reproduce: 
1. Obtain and install the JRE from HP (available for download from
https://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=HPUXJDKJRE60
).

2. Set the environment variable JAVA_HOME=/opt/java6

3. Prepare a CMakeLists.txt file containing the command

find_package(Java REQUIRED)

4. Call CMake using this file.

Additional Information: 
Looking at line 108 in FindJava.cmake, it becomes clear that the version number
reported by java is expected to have the format "1.6.0_06". The problem can thus
be fixed by extending the regular expressions used to extract the version
information (the fixed version is attached below).
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-01-10 12:43 Gerhard Grimm  New Issue                                    
2011-01-10 12:43 Gerhard Grimm  File Added: FindJava.cmake                    
======================================================================




More information about the cmake-developers mailing list