Bug 431681 - Fix java detection on Windows XP
Summary: Fix java detection on Windows XP
Alias: None
Product: 389
Classification: Retired
Component: Directory Console
Version: 1.1.0
Hardware: All
OS: Windows
Target Milestone: ---
Assignee: Rich Megginson
QA Contact: Chandrasekar Kannan
Depends On:
Blocks: 249650 FDS1.2.0
TreeView+ depends on / blocked
Reported: 2008-02-06 13:22 UTC by Ruben Kerkhof
Modified: 2015-01-04 23:30 UTC (History)
3 users (show)

Fixed In Version: 8.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2009-04-29 23:02:28 UTC

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

Description Ruben Kerkhof 2008-02-06 13:22:52 UTC
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 20:16:49 UTC
This may be because of using command.exe vs command.com


Comment 4 Rich Megginson 2009-01-30 01:31:48 UTC
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-03 00:35:09 UTC
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-03 00:37:34 UTC
Created attachment 330698 [details]
cvs commit log

Comment 7 Yi Zhang 2009-03-31 18:53:17 UTC
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 23:02:28 UTC
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.