File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -102,12 +102,17 @@ endif
102102# For Windows, we decide whether to build in 64-bit mode based on
103103# whether java is 32/64-bit (since these need to match)
104104ifeq ($(OSTYPE ) ,cygwin)
105- JAVA_VERSION_STRING = $(shell java -version 2>&1)
106- ifneq (,$(findstring 64-bit, $(JAVA_VERSION_STRING)))
107- ARCH = x86_64
105+ # Default to 64-bit, which is most likely these days
106+ ARCH = x86_64
107+ ifeq ($(shell which java 2>/dev/null),)
108+ $(error "Could not find java executable. Please install Java or add it to your PATH.")
108109 endif
109- ifneq (,$(findstring 64-Bit, $(JAVA_VERSION_STRING)))
110- ARCH = x86_64
110+ JAVA_VERSION_STRING := $(shell java -version 2>&1)
111+ ifneq (,$(findstring 32-bit, $(JAVA_VERSION_STRING)))
112+ ARCH =
113+ endif
114+ ifneq (,$(findstring Client VM, $(JAVA_VERSION_STRING)))
115+ ARCH =
111116 endif
112117endif
113118
You can’t perform that action at this time.
0 commit comments