gertwieland commented on issue #7220: URL: https://github.com/apache/hop/issues/7220#issuecomment-4615344705
Sorry, I should have thought of that! I changed it now, but it's still the same This is from the "About" window java.specification.version=21 java.version=21.0.11 java.vm.vendor=Microsoft I'm using this "wrapper" to start 2.18 because I'm still also using 2.15 and 2.17. (I had a huge issue with a Salesforce bug in 2.16, so in production I'm still running 2.15). java.specification.version=21 java.version=21.0.11 java.vm.vendor=Microsoft This script allows me to use different Java versions for different Hop versions @echo off setlocal REM ============================================================================ REM Hop GUI launcher - Microsoft OpenJDK (a Hop-supported runtime) REM Hop supports Microsoft OpenJDK / Oracle / OpenJDK (64-bit); lists Java 21 as REM the known-good version. Adoptium/Temurin is NOT supported. REM Ref: https://hop.apache.org/manual/latest/supported-jvms.html REM ============================================================================ REM --- Where Microsoft OpenJDK can land: per-user MSI, system MSI, PortableApps --- set "ROOT1=C:\Users\t57664uhn\AppData\Local\Programs\Microsoft" set "ROOT2=C:\Program Files\Microsoft" set "ROOT3=C:\Users\t57664uhn\PortableApps\Java" REM --- Prefer Java 21 (Hop-recommended LTS); else fall back to any jdk-2x present --- set "HOP_JAVA_HOME=" call :findjdk "jdk-21*" if "%HOP_JAVA_HOME%"=="" call :findjdk "jdk-2*" if "%HOP_JAVA_HOME%"=="" ( echo ERROR: No Microsoft OpenJDK / OpenJDK 21+ found under: echo %ROOT1% echo %ROOT2% echo %ROOT3% echo Install Microsoft OpenJDK 21 ^(recommended^): echo https://learn.microsoft.com/java/openjdk/download pause & exit /b 1 ) REM --- Force this JDK regardless of which var hop-gui.bat checks (setlocal keeps it local) --- set "JAVA_HOME=%HOP_JAVA_HOME%" set "PATH=%HOP_JAVA_HOME%\bin;%PATH%" REM --- Fixed Hop 2.18 location --- set "HOPDIR=C:\Users\t57664uhn\PortableApps\Apache Hop\apache-hop-client-2.18.0\hop" if not exist "%HOPDIR%\hop-gui.bat" ( echo ERROR: hop-gui.bat not found in %HOPDIR% pause & exit /b 1 ) REM --- Right-size JVM heap for this 16 GB machine --- REM Physical RAM is 16 GB; leave ~6 GB for Windows + other apps. set "HOP_OPTIONS=-Xmx10g" echo HOP_JAVA_HOME = %HOP_JAVA_HOME% echo HOPDIR = %HOPDIR% echo HOP_OPTIONS = %HOP_OPTIONS% echo. echo Java runtime: "%HOP_JAVA_HOME%\bin\java.exe" -version echo. echo Launching Hop GUI... echo. cd /d "%HOPDIR%" call hop-gui.bat goto :eof REM --------------------------------------------------------------------------- :findjdk REM %~1 = folder glob (e.g. jdk-21* or jdk-2*). Sets HOP_JAVA_HOME if a match has java.exe. for %%r in ("%ROOT1%" "%ROOT2%" "%ROOT3%") do ( for /d %%j in ("%%~r\%~1") do ( if exist "%%j\bin\java.exe" set "HOP_JAVA_HOME=%%j" ) ) goto :eof -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
