edu.rice.cs.drjava.model.repl.newjvm
Class InterpreterJVM
java.lang.Object
|
+--java.rmi.server.RemoteObject
|
+--java.rmi.server.RemoteServer
|
+--java.rmi.server.UnicastRemoteObject
|
+--edu.rice.cs.drjava.model.repl.newjvm.InterpreterJVM
- All Implemented Interfaces:
- InterpreterJVMRemoteI, Remote, Serializable
- public class InterpreterJVM
- extends UnicastRemoteObject
- implements InterpreterJVMRemoteI
This is the main class for the interpreter JVM.
Note that this class is specific to using DynamicJava. It would need
to be subclassed to use with another interpreter. (Really, there would
need to be an abstract base class, but since we don't need it yet I'm
not making one.)
- Version:
- $Id: InterpreterJVM.java,v 1.11 2002/09/13 22:55:34 csreis Exp $
- See Also:
- Serialized Form
WAIT_UNTIL_QUIT_MS
public static final int WAIT_UNTIL_QUIT_MS
CHECK_MAIN_VM_ALIVE_MINUTES
public static final int CHECK_MAIN_VM_ALIVE_MINUTES
EMPTY_TRACE_TEXT
public static final String EMPTY_TRACE_TEXT
_mainJVM
private final MainJVMRemoteI _mainJVM
_interpreter
private JavaInterpreter _interpreter
_classpath
private String _classpath
_junitTestManager
private JUnitTestManager _junitTestManager
InterpreterJVM
public InterpreterJVM(String url)
throws RemoteException,
NotBoundException,
MalformedURLException
interpret
public void interpret(String s)
throws RemoteException
- Specified by:
interpret
in interface InterpreterJVMRemoteI
_dialog
private static void _dialog(String s)
getStackTrace
protected static String getStackTrace(Throwable t)
- Gets the stack trace from the given exception, stripping off
the bottom parts of the trace that are internal to the interpreter.
This would be much easier to do in JDK 1.4, since you can get the
stack trace frames directly, instead of having to parse this!
exitJVM
public void exitJVM()
throws RemoteException
- Specified by:
exitJVM
in interface InterpreterJVMRemoteI
addClassPath
public void addClassPath(String s)
throws RemoteException
- Specified by:
addClassPath
in interface InterpreterJVMRemoteI
getClasspath
public String getClasspath()
runTest
public void runTest(String className,
String fileName)
throws RemoteException
- Specified by:
runTest
in interface InterpreterJVMRemoteI
nonTestCase
public void nonTestCase()
testFinished
public void testFinished(JUnitError[] errors)
setPackageScope
public void setPackageScope(String s)
throws RemoteException
- Specified by:
setPackageScope
in interface InterpreterJVMRemoteI
reset
public void reset()
throws RemoteException
- Specified by:
reset
in interface InterpreterJVMRemoteI
main
public static void main(String[] args)
- Main entry point for interpreter JVM.
- Parameters:
args
- Command-line arguments. #1 must be the URL to find the
MainJVMRemoteI via RMI.