Skip to content

Instantly share code, notes, and snippets.

@adambgoode
Created April 17, 2018 18:04
Show Gist options
  • Save adambgoode/213d2d6d0538feed1c36bf3fc0cd05bf to your computer and use it in GitHub Desktop.
Save adambgoode/213d2d6d0538feed1c36bf3fc0cd05bf to your computer and use it in GitHub Desktop.
JShell sample: passing arguments via system properties
// Pass arguments via system properties
// Usage: jshell -v -R-Dfile=test.txt system-props.jsh
String fileName = System.getProperty("file")
System.out.println("Input file name is: " + fileName)
/exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment