Bug 431681 - Fix java detection on Windows XP
Fix java detection on Windows XP
Product: 389
Classification: Community
Component: Directory Console (Show other bugs)
All Windows
high Severity low
: ---
: ---
Assigned To: Rich Megginson
Chandrasekar Kannan
Depends On:
Blocks: 249650 FDS1.2.0
  Show dependency treegraph
Reported: 2008-02-06 08:22 EST by Ruben Kerkhof
Modified: 2015-01-04 18:30 EST (History)
3 users (show)

See Also:
Fixed In Version: 8.1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-04-29 19:02:28 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
cvs commit log (195 bytes, text/plain)
2009-02-02 19:37 EST, Rich Megginson
no flags Details

  None (edit)
Description Ruben Kerkhof 2008-02-06 08:22:52 EST
Description of problem:

Although java.exe is in my path, fedora-idm-console.bat fails to detect it.

Version-Release number of selected component (if applicable):


How reproducible:

Run fedora-idm-console.bat

Actual results:

The Java Runtime Environment is installed on this machine, but the
command java.exe is not in your PATH.  You can either make sure java.exe
is in the PATH, or edit this script to set JAVA to the full path of

Expected results:

Startup of FDS console.

Additional info:

The check:
where java > nul 2>&1 || goto findjre
doesn't work
replacing it with:
java -version > nul 2>&1 || goto findjre
does the trick on XP
Comment 3 Edward Guy Capriolo 2008-07-01 16:16:49 EDT
This may be because of using command.exe vs command.com

Comment 4 Rich Megginson 2009-01-29 20:31:48 EST
Index: fedora-idm-console.bat
RCS file: /cvs/dirsec/fedora-idm-console/win/fedora-idm-console.bat,v
retrieving revision 1.2
diff -u -8 -b -r1.2 fedora-idm-console.bat
--- fedora-idm-console.bat      14 Dec 2007 21:43:23 -0000      1.2
+++ fedora-idm-console.bat      30 Jan 2009 01:31:04 -0000
@@ -18,17 +18,17 @@
 rem Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 rem set the JAVA to use here
 rem set JAVA=C:\j2sdk1.4.2_15\bin\java
 if not "%JAVA%foo"=="foo" goto launch
-where java > nul 2>&1 || goto findjre
+java -version > nul 2>&1 || goto findjre
 set JAVA=java
 goto launch
 rem look for Java Runtime Environment in registry
 reg QUERY "HKLM\SOFTWARE\JavaSoft\Java Runtime Environment" > nul 2>&1 || goto findjdk
Comment 5 Rich Megginson 2009-02-02 19:35:09 EST
Reviewed by: nkinder (Thanks!)
Fix Description: Just use "java -version" to test for the presence of java
Platforms tested: Windows 2003 server
Flag Day: no
Doc impact: no
Comment 6 Rich Megginson 2009-02-02 19:37:34 EST
Created attachment 330698 [details]
cvs commit log
Comment 7 Yi Zhang 2009-03-31 14:53:17 EDT
Tested on both win2003 and winxp, both passed.

test steps:
1. run java -version -- pass, output shows java 1_6_10
2. run rhds window console (not fedora console) -- pass, console launches
Comment 8 Chandrasekar Kannan 2009-04-29 19:02:28 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.