Bug 431681 - Fix java detection on Windows XP
Summary: Fix java detection on Windows XP
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: 389
Classification: Retired
Component: Directory Console
Version: 1.1.0
Hardware: All
OS: Windows
high
low
Target Milestone: ---
Assignee: Rich Megginson
QA Contact: Chandrasekar Kannan
URL:
Whiteboard:
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:
Environment:
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):

FedoraConsole.msi

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
java.exe

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
http://ask-leo.com/whats_the_difference_between_commandcom_and_cmdexe.html

s/command.exe/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 END COPYRIGHT BLOCK
 
 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
 
 :findjre
 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.

http://rhn.redhat.com/errata/RHEA-2009-0455.html


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