src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellToolBuilder.java

Print this page

        

*** 227,247 **** } /** * 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 */ @Override public void run(String... arguments) throws Exception { rawTool().start(arguments); } /** * Persistence stored in Preferences. */ private static class PreferencesStorage implements PersistentStorage { final Preferences p; --- 227,262 ---- } /** * 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. 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 */ @Override public void run(String... arguments) throws Exception { rawTool().start(arguments); } /** + * 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 { final Preferences p;