Commit ffa303a
committed
Fix MVX_USE_SYSTEM_JAVA behavior: force system Java usage without version checking
## Bug Fix
### Problem
When MVX_USE_SYSTEM_JAVA=true, mvx was still checking version compatibility
and falling back to download if versions didn't match exactly. This contradicts
the expected behavior where the flag should mean "always use system Java".
### Solution
- **No version checking**: When MVX_USE_SYSTEM_JAVA=true, use system Java regardless of version
- **No fallback**: Fail with clear error if system Java unavailable (no download fallback)
- **Consistent behavior**: All methods (Install, IsInstalled, GetPath) follow same logic
### Changes
- Install(): Remove version compatibility check, fail if system Java unavailable
- IsInstalled(): Return true if system Java available, false otherwise
- GetPath(): Return system JAVA_HOME or error, no fallback to downloaded version
### Documentation Updates
- Clarify that MVX_USE_SYSTEM_JAVA forces system Java usage
- Document no version checking and no fallback behavior
- Update configuration guide with correct expectations
### Impact
- **Fixes unexpected downloads** when system Java version differs
- **Clearer semantics**: MVX_USE_SYSTEM_JAVA means "always use system"
- **Better CI/CD control**: Predictable behavior in containerized environments
- **Faster builds**: No time wasted on version checking or downloads
This resolves the issue where Java 24 system installation was being rejected
for Java 22 request, causing unnecessary downloads despite the explicit
MVX_USE_SYSTEM_JAVA=true flag.1 parent 016c403 commit ffa303a
3 files changed
+26
-35
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
69 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
70 | 75 | | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
| 76 | + | |
83 | 77 | | |
| 78 | + | |
| 79 | + | |
84 | 80 | | |
85 | 81 | | |
86 | 82 | | |
| |||
110 | 106 | | |
111 | 107 | | |
112 | 108 | | |
113 | | - | |
| 109 | + | |
114 | 110 | | |
115 | 111 | | |
116 | 112 | | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
123 | 118 | | |
124 | | - | |
125 | 119 | | |
126 | 120 | | |
127 | 121 | | |
| |||
142 | 136 | | |
143 | 137 | | |
144 | 138 | | |
145 | | - | |
| 139 | + | |
146 | 140 | | |
147 | 141 | | |
148 | 142 | | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
155 | 147 | | |
156 | | - | |
157 | 148 | | |
158 | 149 | | |
159 | 150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
315 | | - | |
| 315 | + | |
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
101 | | - | |
| 100 | + | |
| 101 | + | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| |||
0 commit comments