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

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


The following commit(s) were added to refs/heads/main by this push:
     new e306108e64 Fix Java version check for java.security.manager=allow in 
karaf.bat (#3004)
e306108e64 is described below

commit e306108e642005047afdfffdbfb6c64455218b45
Author: Andre Schlegel-Tylla <[email protected]>
AuthorDate: Fri Oct 16 06:00:44 2026 +0200

    Fix Java version check for java.security.manager=allow in karaf.bat (#3004)
    
    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.
    
    Co-authored-by: Claude Opus 5.5 <[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 0be0d7df37..b3893b5387 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