private boolean isSystemShuttingDown()
	{
		try {
			java.lang.reflect.Field running = Class.forName("java.lang.Shutdown").getDeclaredField("RUNNING");
			java.lang.reflect.Field state = Class.forName("java.lang.Shutdown").getDeclaredField("state");

			running.setAccessible(true);
			state.setAccessible(true);

			return state.getInt(null) > running.getInt(null);
		}
		catch (Exception ex) {
			ex.printStackTrace();
			return false;
		}
	}