--- a/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellToolBuilder.java Tue Nov 14 12:07:55 2017 -0800
+++ b/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellToolBuilder.java Tue Nov 14 19:33:37 2017 -0800
@@ -229,7 +229,8 @@
/**
* Run an instance of the Java shell tool as configured by the other methods
* in this interface. This call is not destructive, more than one call of
- * this method may be made from a configured builder.
+ * this method may be made from a configured builder. The exit code from
+ * the Java shell tool is ignored.
*
* @param arguments the command-line arguments (including options), if any
* @throws Exception an unexpected fatal exception
@@ -240,6 +241,20 @@
}
/**
+ * Run an instance of the Java shell tool as configured by the other methods
+ * in this interface. This call is not destructive, more than one call of
+ * this method may be made from a configured builder.
+ *
+ * @param arguments the command-line arguments (including options), if any
+ * @throws Exception an unexpected fatal exception
+ * @return the exit code
+ */
+ @Override
+ public int start(String... arguments) throws Exception {
+ return rawTool().start(arguments);
+ }
+
+ /**
* Persistence stored in Preferences.
*/
private static class PreferencesStorage implements PersistentStorage {