mirror of
https://github.com/corda/corda.git
synced 2025-01-18 18:56:28 +00:00
ISSUE-246 deployNodes doesn't use right version of Java (#5571)
* ISSUE-246 deployNodes doesn't use right version of Java Ensure the network bootstrapper process is executed using the same version of JAVA as the calling process. * Apply same fix to NotaryCopier (used in network builder tool).
This commit is contained in:
parent
515d1088d5
commit
22a8108099
@ -33,6 +33,7 @@ import java.io.File
|
||||
import java.net.URL
|
||||
import java.nio.file.FileAlreadyExistsException
|
||||
import java.nio.file.Path
|
||||
import java.nio.file.Paths
|
||||
import java.nio.file.StandardCopyOption.REPLACE_EXISTING
|
||||
import java.security.PublicKey
|
||||
import java.time.Duration
|
||||
@ -68,7 +69,7 @@ internal constructor(private val initSerEnv: Boolean,
|
||||
companion object {
|
||||
// TODO This will probably need to change once we start using a bundled JVM
|
||||
private val nodeInfoGenCmd = listOf(
|
||||
"java",
|
||||
Paths.get(System.getProperty("java.home"), "bin", "java").toString(),
|
||||
"-jar",
|
||||
"corda.jar",
|
||||
"generate-node-info"
|
||||
|
@ -6,6 +6,7 @@ import net.corda.networkbuilder.nodes.FoundNode
|
||||
import net.corda.networkbuilder.nodes.NodeCopier
|
||||
import org.slf4j.LoggerFactory
|
||||
import java.io.File
|
||||
import java.nio.file.Paths
|
||||
|
||||
class NotaryCopier(private val cacheDir: File) : NodeCopier(cacheDir) {
|
||||
|
||||
@ -28,7 +29,9 @@ class NotaryCopier(private val cacheDir: File) : NodeCopier(cacheDir) {
|
||||
|
||||
fun generateNodeInfo(dirToGenerateFrom: File): File {
|
||||
val nodeInfoGeneratorProcess = ProcessBuilder()
|
||||
.command(listOf("java", "-jar", "corda.jar", "generate-node-info"))
|
||||
.command(listOf(
|
||||
Paths.get(System.getProperty("java.home"), "bin", "java").toString(),
|
||||
"-jar", "corda.jar", "generate-node-info"))
|
||||
.directory(dirToGenerateFrom)
|
||||
.inheritIO()
|
||||
.start()
|
||||
|
Loading…
Reference in New Issue
Block a user