Skip to content

Commit 4784064

Browse files
committed
docs(TESTING.md): add alternative fix for JAVA_COMPILER error
1 parent 8037490 commit 4784064

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

docs/TESTING.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,17 @@ capabilities: [JAVA_COMPILER]
338338
org.gradle.java.home=/path/to/your/jdk17
339339
```
340340

341+
**Alternative fix (command line):** Pass the JDK path directly to Gradle without modifying
342+
`gradle.properties`. Use the `-Dorg.gradle.java.home` flag:
343+
344+
```bash
345+
# Example using a local JDK 17 installation
346+
./gradlew assembleDebug -Dorg.gradle.java.home=/home/user/.jdks/jbr-17.0.9
347+
348+
# Run tests with a specific JDK
349+
./gradlew testDebugUnitTest -Dorg.gradle.java.home=/opt/jdk-17.0.14
350+
351+
341352
Common locations:
342353

343354
| Environment | Path |

0 commit comments

Comments
 (0)