Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
CB-5443 Windows: Handle installed 64 bit Java
  • Loading branch information
jsoref authored and bryanhiggins committed Dec 5, 2013
1 parent 1b90651 commit 5689a49b058623e27dc87bb19d303540c798f3a2
Showing 1 changed file with 22 additions and 8 deletions.
@@ -23,6 +23,28 @@ set CORDOVA_HOME_DIR=%USERPROFILE%\.cordova\lib\blackberry10\cordova\%CORDOVA_VE
set LOCAL_NODE_BINARY=%CORDOVA_HOME_DIR%\bin\dependencies\node\bin
set LOCAL_BBTOOLS_BINARY=%CORDOVA_HOME_DIR%\bin\dependencies\bb-tools\bin

set FOUNDJAVA=
for %%e in (%PATHEXT%) do (
for %%X in (java%%e) do (
if not defined FOUNDJAVA (
set FOUNDJAVA=%%~$PATH:X
)
)
)
if not defined FOUNDJAVA (
set JAVAPATH="%ProgramFiles(x86)%\java\jre7\bin;%ProgramW6432%\java\jre7\bin;"
for %%e in (%PATHEXT%) do (
for %%X in (java%%e) do (
if not defined FOUNDJAVAAT (
set FOUNDJAVAAT=%%~dp$JAVAPATH:X
)
)
)
)
if defined FOUNDJAVAAT (
set PATH=%PATH%;%FOUNDJAVAAT%
)

if defined CORDOVA_NODE (
if exist "%CORDOVA_NODE%" (
if defined CORDOVA_BBTOOLS (
@@ -61,14 +83,6 @@ if exist "%LOCAL_BBTOOLS_BINARY%" (
)
)

set FOUNDJAVA=
for %%e in (%PATHEXT%) do (
for %%X in (java%%e) do (
if not defined FOUNDJAVA (
set FOUNDJAVA=%%~$PATH:X
)
)
)
if not exist "%CORDOVA_NODE%\node.exe" (
echo node cannot be found on the path. Aborting.
exit /b 2

0 comments on commit 5689a49

Please sign in to comment.