The interactions pane runs in a separate JVM. As Eric stated,
executing the "reset" command breaks infinite loops in the
interactions JVM. It accomplishes this task by killing the
interactions JVM and starting a new interactions JVM.
-- Corky
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
How to reset a program like following??? We cannot press the
"reset" button while the programming is waiting for input.
import java.util.*;
public class test {
public static void main(String[] args) {
int count = 0;
Scanner in = new Scanner(System.in);
while (true) {
System.err.println(count++);
in.nextLine();
}
}
}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is a new bug (introduced when we refactored DrJava to
support highlighting in the interactions pane) which we hope
to fix soon. We were not aware of this bug until recently
because we never use console input in our courses.
Resetting the interactions pane will break non-terminating
computations but the console I/O sets a lock which prevents
resetting from working.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=429660
You can stop execution during an infinite loop by resetting interactions, via the "reset" button or menu command.
-- Eric
Logged In: YES
user_id=430590
The interactions pane runs in a separate JVM. As Eric stated,
executing the "reset" command breaks infinite loops in the
interactions JVM. It accomplishes this task by killing the
interactions JVM and starting a new interactions JVM.
-- Corky
Logged In: YES
user_id=1344656
How to reset a program like following??? We cannot press the
"reset" button while the programming is waiting for input.
import java.util.*;
public class test {
public static void main(String[] args) {
int count = 0;
Scanner in = new Scanner(System.in);
while (true) {
System.err.println(count++);
in.nextLine();
}
}
}
Logged In: YES
user_id=430590
This is a new bug (introduced when we refactored DrJava to
support highlighting in the interactions pane) which we hope
to fix soon. We were not aware of this bug until recently
because we never use console input in our courses.
Resetting the interactions pane will break non-terminating
computations but the console I/O sets a lock which prevents
resetting from working.