public void exit() {
		synchronized (finalizers) {
			int nFinalizers = finalizers.size();
			for (int i = 0; i < nFinalizers; i++) {
				Object obj = finalizers.get(i);
				try {
					Class c = obj.getClass();
					Method exit = c.getMethod("exit", new Class[0]);
					exit.invoke(obj, new Object[0]);
				} catch (Exception ex) {
					throw new ErrorException(ex);
				}
			}
		}
		JTFTools.terminateAppletThreads(this);
		if (!isAppletMode) System.exit(0);
	}