xref: /Lucene/help/jvms.txt (revision 8ebf2d0b2187d849032747d0102ca5eb57b76f05)
1*8ebf2d0bSDawid WeissCompiling and testing against different JVMs
2*8ebf2d0bSDawid Weiss============================================
3*8ebf2d0bSDawid Weiss
4*8ebf2d0bSDawid WeissBy default tests are executed with the same Java Gradle is using internally.
5*8ebf2d0bSDawid Weiss
6*8ebf2d0bSDawid WeissTo run tests against a different Java version, define a property called
7*8ebf2d0bSDawid Weiss"runtime.java.home" or define an environment variable "RUNTIME_JAVA_HOME"
8*8ebf2d0bSDawid Weisspointing at the JDK installation folder.
9*8ebf2d0bSDawid Weiss
10*8ebf2d0bSDawid WeissIf property is being used, it can be a system property (-D...) or a project
11*8ebf2d0bSDawid Weissproperty (-P...).
12*8ebf2d0bSDawid Weiss
13*8ebf2d0bSDawid WeissExample:
14*8ebf2d0bSDawid Weiss
15*8ebf2d0bSDawid Weissgradlew test -p lucene/test-framework --tests TestJvmInfo -Dtests.verbose=true -Druntime.java.home=/jvms/jdk14
16*8ebf2d0bSDawid Weiss
17*8ebf2d0bSDawid WeissNote that an alternative JVM can also be made the "default" setting
18*8ebf2d0bSDawid Weissby adding it to (project-local) gradle.properties.
19