This is an automated email from the ASF dual-hosted git repository.

jbonofre pushed a commit to branch karaf-4.4.x
in repository https://gitbox.apache.org/repos/asf/karaf.git


The following commit(s) were added to refs/heads/karaf-4.4.x by this push:
     new 58e338231b Fix Java version check for java.security.manager=allow in 
karaf.bat (#3005)
58e338231b is described below

commit 58e338231b3f579d276f1a4107fc32175b10860b
Author: JB Onofré <[email protected]>
AuthorDate: Fri Oct 16 05:01:01 2026 +0100

    Fix Java version check for java.security.manager=allow in karaf.bat (#3005)
    
    Only the left operand of the comparison was quoted, so cmd compared
    strings instead of numbers ("21" GTR 11 is false). As a result,
    -Djava.security.manager=allow was never set on Windows, unlike bin/inc
    on Unix. Use an unquoted numeric comparison like the GTR 8 check above.
    
    (cherry picked from commit ee21ca588a09909dd354fc1982099d1a350e0d5b)
    
    Co-authored-by: Andre Schlegel-Tylla <[email protected]>
---
 .../features/base/src/main/filtered-resources/resources/bin/karaf.bat   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/assemblies/features/base/src/main/filtered-resources/resources/bin/karaf.bat 
b/assemblies/features/base/src/main/filtered-resources/resources/bin/karaf.bat
index 3c70fb4fe8..64cd60180a 100644
--- 
a/assemblies/features/base/src/main/filtered-resources/resources/bin/karaf.bat
+++ 
b/assemblies/features/base/src/main/filtered-resources/resources/bin/karaf.bat
@@ -267,7 +267,7 @@ if not exist "%JAVA_HOME%\bin\server\jvm.dll" (
 )
 set DEFAULT_JAVA_OPTS=-XX:+UnlockDiagnosticVMOptions
 
-if "%JAVA_VERSION%" GTR 11 (
+if %JAVA_VERSION% GTR 11 (
     set DEFAULT_JAVA_OPTS=%DEFAULT_JAVA_OPTS% -Djava.security.manager=allow
 )
 

Reply via email to