diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/DefaultLoaderDelegate.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/DefaultLoaderDelegate.java index e784f0dc348..b1713020a12 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/DefaultLoaderDelegate.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/DefaultLoaderDelegate.java @@ -114,12 +114,6 @@ class DefaultLoaderDelegate implements LoaderDelegate { } } - @Override - public void setClasspath(String path) - throws EngineTerminationException, InternalException { - throw new NotImplementedException("setClasspath: Not supported yet."); - } - @Override public Class> findClass(String name) throws ClassNotFoundException { Class> klass = klasses.get(name); diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/DirectExecutionControl.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/DirectExecutionControl.java index 0a708954694..4ac77ee4d35 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/DirectExecutionControl.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/DirectExecutionControl.java @@ -131,12 +131,6 @@ public class DirectExecutionControl implements ExecutionControl { loaderDelegate.addToClasspath(cp); } - @Override - public void setClasspath(String path) - throws EngineTerminationException, InternalException { - loaderDelegate.setClasspath(path); - } - /** * {@inheritDoc} *
diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/ExecutionControlForwarder.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/ExecutionControlForwarder.java
index 9811828c985..b1a11dd44af 100644
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/ExecutionControlForwarder.java
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/ExecutionControlForwarder.java
@@ -147,12 +147,6 @@ class ExecutionControlForwarder {
ec.addToClasspath(cp);
return writeSuccess();
}
- case CMD_SET_CLASSPATH: {
- // Set the claspath
- String cp = in.readUTF();
- ec.setClasspath(cp);
- return writeSuccess();
- }
case CMD_STOP: {
// Stop the current execution
try {
diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/LoaderDelegate.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/LoaderDelegate.java
index 062ad44acab..b1d7e33a32f 100644
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/LoaderDelegate.java
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/LoaderDelegate.java
@@ -59,16 +59,6 @@ public interface LoaderDelegate {
void addToClasspath(String path)
throws EngineTerminationException, InternalException;
- /**
- * Sets the execution class path to the specified path.
- *
- * @param path the path to add
- * @throws EngineTerminationException the execution engine has terminated
- * @throws InternalException an internal problem occurred
- */
- void setClasspath(String path)
- throws EngineTerminationException, InternalException;
-
/**
* Finds the class with the specified binary name.
*
diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/RemoteCodes.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/RemoteCodes.java
index a7ecad37689..c841adb253b 100644
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/RemoteCodes.java
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/RemoteCodes.java
@@ -65,10 +65,6 @@ class RemoteCodes {
* Add to the class-path.
*/
static final String CMD_ADD_CLASSPATH = "CMD_ADD_CLASSPATH";
- /**
- * Set the class-path.
- */
- static final String CMD_SET_CLASSPATH = "CMD_SET_CLASSPATH";
/**
* Stop an invoke.
*/
diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/StreamingExecutionControl.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/StreamingExecutionControl.java
index f3495f1213a..60552894212 100644
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/StreamingExecutionControl.java
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/StreamingExecutionControl.java
@@ -136,21 +136,6 @@ public class StreamingExecutionControl implements ExecutionControl {
}
}
- @Override
- public void setClasspath(String path)
- throws EngineTerminationException, InternalException {
- try {
- // Send the classpath addition command to the remote agent.
- writeCommand(CMD_SET_CLASSPATH);
- out.writeUTF(path);
- out.flush();
- // Retrieve and report results from the remote agent.
- readAndReportClassSimpleResult();
- } catch (IOException ex) {
- throw new EngineTerminationException("Exception writing remote set classpath: " + ex);
- }
- }
-
@Override
public void stop()
throws EngineTerminationException, InternalException {
diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionControl.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionControl.java
index 7760cbc398c..a054f99c108 100644
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionControl.java
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionControl.java
@@ -117,16 +117,6 @@ public interface ExecutionControl extends AutoCloseable {
void addToClasspath(String path)
throws EngineTerminationException, InternalException;
- /**
- * Sets the execution class path to the specified path.
- *
- * @param path the path to add
- * @throws EngineTerminationException the execution engine has terminated
- * @throws InternalException an internal problem occurred
- */
- void setClasspath(String path)
- throws EngineTerminationException, InternalException;
-
/**
* Interrupts a running invoke.
*
diff --git a/langtools/test/jdk/jshell/KullaTesting.java b/langtools/test/jdk/jshell/KullaTesting.java
index 9edc256f510..1197d0399a0 100644
--- a/langtools/test/jdk/jshell/KullaTesting.java
+++ b/langtools/test/jdk/jshell/KullaTesting.java
@@ -99,7 +99,6 @@ public class KullaTesting {
private Map