Stop-build [Ctrl-C] is no good for Java apps, it just causes the JVM to produce a heap dump. Stop-build needs to actually kill the Java process.
Try it out for yourself, compile and run this little demo.
public class demo {
public static void main(String args[]) {
boolean machineRustedOut = false;
while (!machineRustedOut) {
try {
Thread.sleep(1000);
System.out.println("Still here");
} catch (InterruptedException ie) {
System.out.println("Who interrupts my sleep?");
}
}
System.out.println("Corrosion took its toll");
}
}