View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006814CMakeCMakepublic2008-04-16 07:122016-06-10 14:30
ReporterFaux 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0006814: 32-bit Java not found by 64-bit CMake on Windows.
Descriptionhttp://www.cdash.org/CDash/testDetails.php?test=2317052&build=54733 [^]

One of my machines, anoia.goeswhere.com, continually fails the Java test. This is because it fails to locate "java.exe" in any of it's search paths.

The machine (running x64 Vista) has a 32-bit version of Sun's JVM installed, which means that the java.exe is located at "C:\Windows\SysWOW64\java.exe" (and "C:\Program Files (x86)\Java\jdk1.6.0_05\bin" etc.); a location that is not searched by (64-bit) CMake.

Would it make sense to search for the 32-bit JVM too, even if just (by default?) during testing?
Additional InformationTest command line: C:\cmaketest\bindir\bin\ctest.exe --build-and-test C:/cmaketest/srcdir/Tests/Java C:/cmaketest/bindir/Tests/Java --build-generator "NMake Makefiles" --build-project hello --build-makeprogram nmake --build-two-config --build-run-dir C:/cmaketest/bindir/Tests/Java/ --test-command C:/Windows/System32/java.exe -classpath hello.jar HelloWorld

Test output:
Could not find executable C:/Windows/System32/java.exe
Looked in the following places:
C:/Windows/System32/java.exe
C:/Windows/System32/java.exe.exe
C:/Windows/System32/Release/java.exe
C:/Windows/System32/Release/java.exe.exe
C:/Windows/System32/Debug/java.exe
C:/Windows/System32/Debug/java.exe.exe
C:/Windows/System32/MinSizeRel/java.exe
C:/Windows/System32/MinSizeRel/java.exe.exe
C:/Windows/System32/RelWithDebInfo/java.exe
C:/Windows/System32/RelWithDebInfo/java.exe.exe
C:/Windows/System32/Deployment/java.exe
C:/Windows/System32/Deployment/java.exe.exe
C:/Windows/System32/Development/java.exe
C:/Windows/System32/Development/java.exe.exe
Internal cmake changing into directory: C:/cmaketest/bindir/Tests/Java
======== CMake output ======
Out of source, using built-in Java support
Out of source, using built-in Java support
======== End CMake output ======
Change Dir: C:/cmaketest/bindir/Tests/Java

Run Clean Command:nmake /NOLOGO "clean"
    "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\nmake.exe" -f CMakeFiles\Makefile2 /nologo -L clean
    "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\nmake.exe" -f CMakeFiles\hello.dir\build.make /nologo -L CMakeFiles\hello.dir\clean
    C:\cmaketest\bindir\bin\cmake.exe -P CMakeFiles\hello.dir\cmake_clean.cmake

Run Build Command:nmake /NOLOGO
    C:\cmaketest\bindir\bin\cmake.exe -HC:\cmaketest\srcdir\Tests\Java -BC:\cmaketest\bindir\Tests\Java --check-build-system CMakeFiles\Makefile.cmake 0
    C:\cmaketest\bindir\bin\cmake.exe -E cmake_progress_start C:\cmaketest\bindir\Tests\Java\CMakeFiles C:\cmaketest\bindir\Tests\Java\CMakeFiles\progress.make
    "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\nmake.exe" -f CMakeFiles\Makefile2 /nologo -L all
    "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\nmake.exe" -f CMakeFiles\hello.dir\build.make /nologo -L CMakeFiles\hello.dir\depend
    C:\cmaketest\bindir\bin\cmake.exe -E cmake_depends "NMake Makefiles" C:\cmaketest\srcdir\Tests\Java C:\cmaketest\srcdir\Tests\Java C:\cmaketest\bindir\Tests\Java C:\cmaketest\bindir\Tests\Java C:\cmaketest\bindir\Tests\Java\CMakeFiles\hello.dir\DependInfo.cmake --color=
Scanning dependencies of target hello
    "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\nmake.exe" -f CMakeFiles\hello.dir\build.make /nologo -L CMakeFiles\hello.dir\build
    C:\cmaketest\bindir\bin\cmake.exe -E cmake_progress_report C:\cmaketest\bindir\Tests\Java\CMakeFiles 1
[ 50%] Building Java object CMakeFiles/hello.dir/A.class
    C:\PROGRA~1\Java\JDK16~1.0_0\bin\javac.exe -classpath C:\cmaketest\srcdir\Tests\Java;C:\cmaketest\bindir\Tests\Java C:\cmaketest\srcdir\Tests\Java\A.java -d CMakeFiles\hello.dir
    C:\cmaketest\bindir\bin\cmake.exe -E cmake_progress_report C:\cmaketest\bindir\Tests\Java\CMakeFiles 2
[100%] Building Java object CMakeFiles/hello.dir/HelloWorld.class
    C:\PROGRA~1\Java\JDK16~1.0_0\bin\javac.exe -classpath C:\cmaketest\srcdir\Tests\Java;C:\cmaketest\bindir\Tests\Java C:\cmaketest\srcdir\Tests\Java\HelloWorld.java -d CMakeFiles\hello.dir
Linking Java static library hello.jar
    C:\cmaketest\bindir\bin\cmake.exe -P CMakeFiles\hello.dir\cmake_clean_target.cmake
    C:\PROGRA~1\Java\JDK16~1.0_0\bin\jar.exe -cf hello.jar -C CMakeFiles\hello.dir .
    C:\cmaketest\bindir\bin\cmake.exe -E cmake_progress_report C:\cmaketest\bindir\Tests\Java\CMakeFiles 1 2
[100%] Built target hello
    C:\cmaketest\bindir\bin\cmake.exe -E cmake_progress_start C:\cmaketest\bindir\Tests\Java\CMakeFiles 0
Could not find path to executable, perhaps it was not built: C:/Windows/System32/java.exe
tried to find it in these places:

C:/Windows/System32/java.exe
C:/Windows/System32/java.exe.exe
C:/Windows/System32/Release/java.exe
C:/Windows/System32/Release/java.exe.exe
C:/Windows/System32/Debug/java.exe
C:/Windows/System32/Debug/java.exe.exe
C:/Windows/System32/MinSizeRel/java.exe
C:/Windows/System32/MinSizeRel/java.exe.exe
C:/Windows/System32/RelWithDebInfo/java.exe
C:/Windows/System32/RelWithDebInfo/java.exe.exe
C:/Windows/System32/Deployment/java.exe
C:/Windows/System32/Deployment/java.exe.exe
C:/Windows/System32/Development/java.exe
C:/Windows/System32/Development/java.exe.exe
TagsNo tags attached.
Attached Files

 Relationships
related to 0007095closed Win32 cmake fails to find some x64 executables 

  Notes
(0012178)
Faux (reporter)
2008-05-31 12:25

This is related to http://public.kitware.com/Bug/view.php?id=7095 [^] , but using the filesystem under wow64 is complicated compared to the registry (it requires linking against additional functions not available in earlier OSes ie. getprocaddress).
(0012283)
Brad King (manager)
2008-06-06 11:54

Is there a registry entry for the JVM?
(0012284)
Faux (reporter)
2008-06-06 12:03
edited on: 2008-06-06 12:06

The key:
HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit\CurrentVersion

contains the REG_SZ: 1.6.

The key:
HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit\1.6\JavaHome

contains the REG_SZ: C:\Program Files\Java\jdk1.6.0_10

..which is the path of the current x64 JVM on this machine. This is also true when viewed from WoW64 (ie. a different path is returned, containing the 32-bit JVM).

I have no idea if this set-up is supported, however. The best docs I can find is http://java.sun.com/javase/6/webnotes/runtime_windows.html [^] (which seems to be the same all the way back to at least java3), but is only for the JVM, not the JDK.

(0012285)
Brad King (manager)
2008-06-06 12:20

For reference, here is MSDN documentation for the filesystem redirector:

http://msdn.microsoft.com/en-us/library/aa384187(VS.85).aspx [^]
(0012286)
Brad King (manager)
2008-06-06 12:22

With the fix to issue 0007095 a 32-bit or 64-bit CMake should check both views of the registry and be able to see the 32-bit JavaHome entry pointing at
"C:\Program Files (x86)\Java\jdk1.6.0_05\bin". Isn't this enough to find it? Have you tried CMake from CVS HEAD?
(0030542)
Brad King (manager)
2012-08-13 10:37

Sending issues I'm not actively working on to the backlog to await someone with time for them.

If an issue you care about is sent to the backlog when you feel it should have been addressed in a different manner, please bring it up on the CMake mailing list for discussion. Sign up for the mailing list here, if you're not already on it:

 http://www.cmake.org/mailman/listinfo/cmake [^]

It's easy to re-activate a bug here if you can find a CMake developer or contributor who has the bandwidth to take it on.
(0041421)
Kitware Robot (administrator)
2016-06-10 14:27

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.

 Issue History
Date Modified Username Field Change
2008-04-16 07:12 Faux New Issue
2008-05-31 12:25 Faux Note Added: 0012178
2008-06-06 11:11 Bill Hoffman Status new => assigned
2008-06-06 11:11 Bill Hoffman Assigned To => Brad King
2008-06-06 11:54 Brad King Relationship added related to 0007095
2008-06-06 11:54 Brad King Note Added: 0012283
2008-06-06 12:03 Faux Note Added: 0012284
2008-06-06 12:06 Faux Note Edited: 0012284
2008-06-06 12:20 Brad King Note Added: 0012285
2008-06-06 12:22 Brad King Note Added: 0012286
2012-08-13 10:37 Brad King Status assigned => backlog
2012-08-13 10:37 Brad King Note Added: 0030542
2016-06-10 14:27 Kitware Robot Note Added: 0041421
2016-06-10 14:27 Kitware Robot Status backlog => resolved
2016-06-10 14:27 Kitware Robot Resolution open => moved
2016-06-10 14:30 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team