From 4356adf3da4903265be041a8aa3b345c57f2cad5 Mon Sep 17 00:00:00 2001 From: shalomcarmel Date: Thu, 16 Jul 2026 02:16:35 +0300 Subject: [PATCH 1/2] fix issue #1647 where win32 CLI does not run because of incompatible environment --- src/main/resources/win/bin/process.bat | 2 +- src/main/resources/win/util/util.bat | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/main/resources/win/bin/process.bat b/src/main/resources/win/bin/process.bat index cb224e52a..7bf1c98c5 100644 --- a/src/main/resources/win/bin/process.bat +++ b/src/main/resources/win/bin/process.bat @@ -1,2 +1,2 @@ @echo off -CALL "%~dp0..\util\util.bat" :runDataLoader run.mode=batch %* \ No newline at end of file +CALL "%~dp0..\util\util.bat" :runDataLoaderHeadless run.mode=batch %* \ No newline at end of file diff --git a/src/main/resources/win/util/util.bat b/src/main/resources/win/util/util.bat index 0c9de8d8f..345cc061f 100755 --- a/src/main/resources/win/util/util.bat +++ b/src/main/resources/win/util/util.bat @@ -6,11 +6,14 @@ CALL %* EXIT /b %ERRORLEVEL% :initVars - SET DATALOADER_VERSION=@@FULL_VERSION@@ + SET DATALOADER_VERSION=67.0.0 FOR /f "tokens=1 delims=." %%a IN ("%DATALOADER_VERSION%") DO ( SET DATALOADER_SHORT_VERSION=%%a ) - SET MIN_JAVA_VERSION=@@MIN_JAVA_VERSION@@ + SET MIN_JAVA_VERSION=17 + rem Set ClassPath for headless win32 compatibility + set SWT_VERSION=4.36 + set DATALOADER_HEADLESS_CP=swtwin32_x86_64-%SWT_VERSION%.jar;dataloader-%DATALOADER_VERSION%.jar EXIT /b 0 :checkJavaVersion @@ -50,12 +53,17 @@ EXIT /b %ERRORLEVEL% echo ^ echo. EXIT -1 - + :runDataLoader CALL :checkJavaVersion java --enable-native-access=ALL-UNNAMED -cp "%~dp0..\*" com.salesforce.dataloader.process.DataLoaderRunner %* EXIT /b %ERRORLEVEL% +:runDataLoaderHeadless + CALL :checkJavaVersion + java -Djava.awt.headless=true --enable-native-access=ALL-UNNAMED -cp "%~dp0..\%DATALOADER_HEADLESS_CP%" com.salesforce.dataloader.process.DataLoaderRunner %* + EXIT /b %ERRORLEVEL% + REM Shortcut files have .lnk extension :CreateShortcut powershell -Command "$WshShell = New-Object -comObject WScript.Shell; $Shortcut = $WshShell.CreateShortcut(""""%~1""""); $Shortcut.WorkingDirectory = """"%~2""""; $Shortcut.TargetPath = """"%~2\dataloader.bat""""; $Shortcut.IconLocation = """"%~2\dataloader.ico""""; $Shortcut.WindowStyle=7; $Shortcut.Save()" From 677a5befcf6654a76a09f5269a1ff270897d1911 Mon Sep 17 00:00:00 2001 From: shalomcarmel Date: Thu, 16 Jul 2026 02:34:17 +0300 Subject: [PATCH 2/2] fix issue #1647 where win32 CLI does not run because of incompatible environment --- src/main/resources/win/util/util.bat | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/resources/win/util/util.bat b/src/main/resources/win/util/util.bat index 345cc061f..9c09f4648 100755 --- a/src/main/resources/win/util/util.bat +++ b/src/main/resources/win/util/util.bat @@ -13,7 +13,12 @@ EXIT /b %ERRORLEVEL% SET MIN_JAVA_VERSION=17 rem Set ClassPath for headless win32 compatibility set SWT_VERSION=4.36 - set DATALOADER_HEADLESS_CP=swtwin32_x86_64-%SWT_VERSION%.jar;dataloader-%DATALOADER_VERSION%.jar + if /i "%PROCESSOR_ARCHITECTURE%"=="ARM64" ( + set "SWT_JAR=swtwin32_aarch64-%SWT_VERSION%.jar" + ) else ( + set "SWT_JAR=swtwin32_x86_64-%SWT_VERSION%.jar" + ) + set DATALOADER_HEADLESS_CP=%SWT_JAR%;dataloader-%DATALOADER_VERSION%.jar EXIT /b 0 :checkJavaVersion