In the world of 64/32 bit native libraries sometimes you need to specify specific jre to run code against. I have 64/32 bit jres installed locally. Default is 64 bit, but i need to run some tests using the 32 bit jvm...
How do i tell gradle the path to 32bit java.exe client on my local system? It cannot be java_home which defaults to the jdk, i just need to specify the jre client for test execution phase in gradle.build.
Something like
tasks.withType(Test) {
systemProperty "java.library.path", "C:\\here\\nativestuff\\lib"
systemProperty "java.client", "C:\\Program\ Files\ \(x86\)\\Java\\jre7\\bin\\java.exe"}
Tried everything i could think of, no clue how to get it to work
I was able to get everything to work by setting gradle.properties:
jre32home=C:/Program Files (x86)/Java/jre7
I'm using gradle 2.3 btw
In gradle.build I use:
test.executable = "${jre32home}/bin/java"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With