From c626f8b306679cb7ed34524758ae646e0b94320e Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Sun, 5 Mar 2017 15:38:50 +0100 Subject: [PATCH] Make the corda.jar executable on UNIX. When run in this way, it eliminates the overhead of a second JVM. --- node/capsule/build.gradle | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/node/capsule/build.gradle b/node/capsule/build.gradle index 8f2a0f957b..a05f7b2eff 100644 --- a/node/capsule/build.gradle +++ b/node/capsule/build.gradle @@ -73,6 +73,11 @@ task buildCordaJAR(type: FatCapsule) { jvmArgs = ['-Xmx200m', '-XX:+UseG1GC'] } + // Make the resulting JAR file directly executable on UNIX by prepending a shell script to it. + // This lets you run the file like so: ./corda.jar + // Other than being slightly less typing, this has one big advantage: Ctrl-C works properly in the terminal. + reallyExecutable { trampolining() } + manifest { attributes('Corda-Version': corda_version) }