Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --java-options option to kcl-bootstrap #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions bin/kcl-bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,14 @@ function parseArguments() {
program
.option('-p, --properties <properties file>', 'properties file with multi-language daemon options')
.option('-j, --java [java path]', 'path to java executable - defaults to using JAVA_HOME environment variable to get java path (optional)')
.option('-o, --java-options <java options>', 'specify java options or system properties (optional)')
.option('-c, --jar-path [jar path]', 'path where all multi-language daemon jar files will be downloaded (optional)')
.option('-e, --execute', 'execute the KCL application')
.parse(process.argv);

var args = {
'properties': program.properties,
'javaOptions': (program.javaOptions ? program.javaOptions : (process.env.JAVA_OPTIONS ? process.env.JAVA_OPTIONS : null)),
'java': (program.java ? program.java : (process.env.JAVA_HOME ? path.join(process.env.JAVA_HOME, 'bin', 'java') : null)),
'jarPath': (program.jarPath ? program.jarPath : DEFAULT_JAR_PATH),
'execute': program.execute
Expand Down Expand Up @@ -102,6 +104,9 @@ function startKinesisClientLibraryApplication(options) {
var classpath = getClasspath(options).join(getPathDelimiter());
var java = options.java;
var args = ['-cp', classpath, MULTI_LANG_DAEMON_CLASS, options.properties];
if (options.javaOptions) {
args.unshift(options.javaOptions)
}
var cmd = java + ' ' + args.join(' ');

console.log("==========================================================");
Expand Down