MantisBT - CMake
View Issue Details
0011676CMakeModulespublic2011-01-10 12:432011-03-28 11:26
Gerhard Grimm 
Mathieu Malaterre 
normalminoralways
closedfixed 
Itanium (IA64)HP-UX11.23
CMake 2.8.3 
 
0011676: find_package(Java) gives warning "regex not supported"
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 "..")
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.
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).
No tags attached.
? FindJava.cmake (7,497) 2011-01-10 12:43
https://public.kitware.com/Bug/file/3612/FindJava.cmake
Issue History
2011-01-10 12:43Gerhard GrimmNew Issue
2011-01-10 12:43Gerhard GrimmFile Added: FindJava.cmake
2011-01-10 12:59Mathieu MalaterreAssigned To => Mathieu Malaterre
2011-01-10 12:59Mathieu MalaterreStatusnew => assigned
2011-03-28 11:26Mathieu MalaterreNote Added: 0025926
2011-03-28 11:26Mathieu MalaterreStatusassigned => closed
2011-03-28 11:26Mathieu MalaterreResolutionopen => fixed

Notes
(0025926)
Mathieu Malaterre   
2011-03-28 11:26   
$ git push stage HEAD
Counting objects: 7, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 405 bytes, done.
Total 4 (delta 3), reused 0 (delta 0)
To git@cmake.org:stage/cmake.git
 * [new branch] HEAD -> fixbug_0011676