added System.exit so that vm instances gets nuked in webstart

This commit is contained in:
Brian Matzon 2005-05-22 12:12:10 +00:00
parent 4ad9b565d5
commit 4a85362ccb
38 changed files with 62 additions and 22 deletions

View File

@ -78,6 +78,8 @@ public class Game {
} finally {
cleanup();
}
System.exit(0);
}
/**

View File

@ -576,8 +576,9 @@ public class Game {
* @param argv The arguments that are passed into our game
*/
public static void main(String argv[]) {
System.out.println("Use -fullscreen for fullscreen mode");
System.out.println("Use -fullscreen for fullscreen mode");
new Game((argv.length > 0 && argv[0].equalsIgnoreCase("-fullscreen"))).execute();
System.exit(0);
}
/**

View File

@ -243,5 +243,6 @@ public class DisplayTest {
*/
public static void main(String[] args) throws LWJGLException {
new DisplayTest().executeTest();
System.exit(0);
}
}

View File

@ -175,5 +175,6 @@ public class SysTest {
*/
public static void main(String[] args) {
new SysTest().executeTest();
System.exit(0);
}
}

View File

@ -287,6 +287,7 @@ public class WindowCreationTest {
wct.execute();
wct.destroy();
}
System.exit(0);
}
/**

View File

@ -115,7 +115,7 @@ public class BasicTest {
IL.destroy();
} catch (Exception e) {
e.printStackTrace();
System.exit(0);
}
System.exit(0);
}
}

View File

@ -53,13 +53,14 @@ public class CDDAPlayer {
FMOD.create();
} catch (FMODException fmode) {
fmode.printStackTrace();
return;
System.exit(0);
}
System.out.println("Initializing FMOD");
if (!FSound.FSOUND_Init(44100, 32, 0)) {
System.out.println("Failed to initialize FMOD");
return;
System.exit(0);
}
boolean running = true;
@ -115,5 +116,8 @@ public class CDDAPlayer {
}
FSound.FSOUND_Close();
FMOD.destroy();
System.exit(0);
}
}

View File

@ -52,13 +52,13 @@ public class CDPlayer {
FMOD.create();
} catch (FMODException fmode) {
fmode.printStackTrace();
return;
System.exit(0);
}
System.out.println("Initializing FMOD");
if (!FSound.FSOUND_Init(44100, 32, 0)) {
System.out.println("Failed to initialize FMOD");
return;
System.exit(0);
}
boolean running = true;
@ -132,5 +132,6 @@ public class CDPlayer {
FSound.FSOUND_Close();
FMOD.destroy();
System.exit(0);
}
}

View File

@ -67,21 +67,21 @@ public class DSPTest {
File file = new File(args[0]);
if (!file.exists()) {
System.out.println("No such file: " + args[0]);
return;
System.exit(0);
}
try {
FMOD.create();
} catch (FMODException fmode) {
fmode.printStackTrace();
return;
System.exit(0);
}
System.out.println("Initializing FMOD");
if (!FSound.FSOUND_Init(44100, 32, 0)) {
System.out.println("Failed to initialize FMOD");
System.out.println("Error: " + FMOD.FMOD_ErrorString(FSound.FSOUND_GetError()));
return;
System.exit(0);
}
System.out.println("Loading " + args[0]);
@ -156,6 +156,7 @@ public class DSPTest {
FSound.FSOUND_Close();
FMOD.destroy();
System.exit(0);
}
public class TestDspCallback implements FSoundDSPCallback {

View File

@ -60,14 +60,14 @@ public class MusicPlayer {
File file = new File(args[0]);
if (!file.exists()) {
System.out.println("No such file: " + args[0]);
return;
System.exit(0);
}
try {
FMOD.create();
} catch (FMODException fmode) {
fmode.printStackTrace();
return;
System.exit(0);
}
System.out.println("Initializing FMOD");
@ -101,5 +101,6 @@ public class MusicPlayer {
FSound.FSOUND_Close();
FMOD.destroy();
System.exit(0);
}
}

View File

@ -110,6 +110,7 @@ public class NetTest {
stop();
FSound.FSOUND_Close();
FMOD.destroy();
System.exit(0);
}
}

View File

@ -59,21 +59,21 @@ public class StreamPlayer {
File file = new File(args[0]);
if (!file.exists()) {
System.out.println("No such file: " + args[0]);
return;
System.exit(0);
}
try {
FMOD.create();
} catch (FMODException fmode) {
fmode.printStackTrace();
return;
System.exit(0);
}
System.out.println("Initializing FMOD");
if (!FSound.FSOUND_Init(44100, 32, 0)) {
System.out.println("Failed to initialize FMOD");
System.out.println("Error: " + FMOD.FMOD_ErrorString(FSound.FSOUND_GetError()));
return;
System.exit(0);
}
System.out.println("Loading " + args[0]);
@ -98,5 +98,6 @@ public class StreamPlayer {
FSound.FSOUND_Close();
FMOD.destroy();
System.exit(0);
}
}

View File

@ -62,14 +62,14 @@ public class StreamPlayerMemory {
FMOD.create();
} catch (FMODException fmode) {
fmode.printStackTrace();
return;
System.exit(0);
}
System.out.println("Initializing FMOD");
if (!FSound.FSOUND_Init(44100, 32, 0)) {
System.out.println("Failed to initialize FMOD");
System.out.println("Error: " + FMOD.FMOD_ErrorString(FSound.FSOUND_GetError()));
return;
System.exit(0);
}
ByteBuffer data = getData(args[0]);
@ -97,6 +97,7 @@ public class StreamPlayerMemory {
FSound.FSOUND_Close();
FMOD.destroy();
System.exit(0);
}
/**

View File

@ -51,7 +51,7 @@ public class StreamTest {
FMOD.create();
} catch (FMODException fmode) {
fmode.printStackTrace();
return;
System.exit(0);
}
IntBuffer caps = BufferUtils.createIntBuffer(1);
@ -68,7 +68,7 @@ public class StreamTest {
if (!FSound.FSOUND_Init(44100, 32, 0)) {
System.out.println("Failed to initialize FMOD");
System.out.println("Error: " + FMOD.FMOD_ErrorString(FSound.FSOUND_GetError()));
return;
System.exit(0);
}
IntBuffer mem = BufferUtils.createIntBuffer(2);

View File

@ -109,7 +109,7 @@ public class SyncTest {
File file = new File(args[0]);
if (!file.exists()) {
System.out.println("No such file: " + args[0]);
return;
System.exit(0);
}
// initialize FMOD
@ -118,7 +118,7 @@ public class SyncTest {
FMOD.create();
} catch (FMODException fmode) {
fmode.printStackTrace();
return;
System.exit(0);
}
// start actual test
@ -254,5 +254,6 @@ public class SyncTest {
}
FSound.FSOUND_Close();
FMOD.destroy();
System.exit(0);
}
}

View File

@ -75,11 +75,11 @@ public class TagFieldTest {
System.out.println("Failed to initialize FMOD");
System.out.println("Error: " + FMOD.FMOD_ErrorString(FSound.FSOUND_GetError()));
FMOD.destroy();
return;
System.exit(0);
}
} catch (FMODException fmode) {
fmode.printStackTrace();
return;
System.exit(0);
}
// scan the supplied arg
@ -89,6 +89,7 @@ public class TagFieldTest {
// shutdown
FSound.FSOUND_Close();
FMOD.destroy();
System.exit(0);
}
/**

View File

@ -393,5 +393,6 @@ public class HWCursorTest {
System.out.println("Change between fullscreen and windowed mode, by pressing F and W respectively. Enable hw cursor with N and disable it with M.");
HWCursorTest cursorTest = new HWCursorTest();
cursorTest.execute();
System.exit(0);
}
}

View File

@ -236,5 +236,6 @@ public class KeyboardTest {
public static void main(String[] args) {
KeyboardTest kt = new KeyboardTest();
kt.executeTest();
System.exit(0);
}
}

View File

@ -204,5 +204,6 @@ public class MouseCreationTest {
public static void main(String[] args) {
MouseCreationTest mt = new MouseCreationTest();
mt.executeTest();
System.exit(0);
}
}

View File

@ -411,5 +411,6 @@ public class MouseTest {
public static void main(String[] args) {
MouseTest mt = new MouseTest();
mt.executeTest();
System.exit(0);
}
}

View File

@ -104,5 +104,6 @@ public class ALCTest extends BasicTest {
public static void main(String[] args) {
ALCTest alcTest = new ALCTest();
alcTest.execute(args);
System.exit(0);
}
}

View File

@ -213,5 +213,6 @@ public class MovingSoundTest extends BasicTest {
public static void main(String[] args) {
MovingSoundTest movingSoundTest = new MovingSoundTest();
movingSoundTest.execute(args);
System.exit(0);
}
}

View File

@ -220,5 +220,6 @@ public class OpenALCreationTest {
public static void main(String[] args) {
OpenALCreationTest oalCreationTest = new OpenALCreationTest();
oalCreationTest.execute(args);
System.exit(0);
}
}

View File

@ -216,5 +216,6 @@ public class PlayTest extends BasicTest {
public static void main(String[] args) {
PlayTest playTest = new PlayTest();
playTest.execute(args);
System.exit(0);
}
}

View File

@ -229,5 +229,6 @@ public class PlayTestMemory extends BasicTest {
public static void main(String[] args) {
PlayTestMemory playTestMemory = new PlayTestMemory();
playTestMemory.execute(args);
System.exit(0);
}
}

View File

@ -484,6 +484,7 @@ public class PositionTest extends BasicTest {
public static void main(String[] args) {
PositionTest positionTest = new PositionTest();
positionTest.execute(args);
System.exit(0);
}
/**

View File

@ -160,5 +160,6 @@ public class SourceLimitTest extends BasicTest {
public static void main(String[] args) {
SourceLimitTest sourceLimitTest = new SourceLimitTest();
sourceLimitTest.execute(args);
System.exit(0);
}
}

View File

@ -218,5 +218,6 @@ public class StressTest extends BasicTest {
public static void main(String[] args) {
StressTest stressTest = new StressTest();
stressTest.execute(args);
System.exit(0);
}
}

View File

@ -271,5 +271,6 @@ public class FullScreenWindowedTest {
System.out.println("Move quad using arrowkeys, and change rotation using +/-");
FullScreenWindowedTest fswTest = new FullScreenWindowedTest();
fswTest.execute();
System.exit(0);
}
}

View File

@ -71,6 +71,7 @@ public class Gears {
public static void main(String[] args) {
new Gears().execute();
System.exit(0);
}
/**

View File

@ -395,5 +395,6 @@ public class PbufferTest {
System.out.println("Move quad using arrowkeys, and change rotation using +/-");
PbufferTest fswTest = new PbufferTest();
fswTest.execute();
System.exit(0);
}
}

View File

@ -130,6 +130,7 @@ public final class VBOIndexTest {
} finally {
cleanup();
}
System.exit(0);
}
/**

View File

@ -126,6 +126,7 @@ public final class VBOTest {
} finally {
cleanup();
}
System.exit(0);
}
/**

View File

@ -134,6 +134,7 @@ public class AWTGears extends Frame {
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
dispose();
System.exit(0);
}
});
setResizable(true);

View File

@ -112,6 +112,7 @@ public class AWTTest extends Frame {
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
dispose();
System.exit(0);
}
});
setResizable(true);

View File

@ -152,6 +152,7 @@ public class DemoBox extends Frame {
public void windowClosing(WindowEvent e) {
demoCanvas.destroy();
dispose();
System.exit(0);
}
});

View File

@ -422,6 +422,7 @@ public final class PbufferTest {
PbufferTest test = new PbufferTest(mode);
test.execute();
System.exit(0);
}
private static void kill(final String msg) {

View File

@ -116,6 +116,7 @@ public final class ShadersTest {
}
cleanup();
System.exit(0);
}
private static void initialize(String[] args) {