Execute Java in a new window

From: BlackHawke (blackhawke_at_legacygames.net)
Date: 02/04/04


Date: Wed, 04 Feb 2004 07:07:05 GMT

Our program, game program Andromeda Online (www.andromedaonline.net) uses
two programs- one to play the game, another to patch the game as updates
come out. Players actually launch the updater which checks for fresh
updates, then installs them, then launches the game client.

We have begun our beta test, and would like to have the client open with a
console window so that players can see exceptions that are thrown. How to do
this seems to be a question no-one can answer.

A common misconception (as I understand it) is to use "javaw", but javaw
actually runs a program with no console. It's 'java' which will open a
command window to run in.

So how do we get our update program to launch our client program in a
console window? This is the code we have now:

 public static void main(String args[]) {
        UpdateFrame uf = new UpdateFrame();

        try {Process p =
Runtime.getRuntime().exec("java -Xmx64M -Xms64M -jar AndromedaClient.jar");}
        catch(Exception exc) {exc.printStackTrace(System.out);}

        uf.removeNotify();
        uf.dispose();
    }

This successfully launches the client, but the client does not run in
console mode.

Any help would be greatly appreciated.

Nick Soutter



Relevant Pages

  • Execute Java in a new window
    ... game program Andromeda Online uses ... Players actually launch the updater which checks for fresh ... updates, then installs them, then launches the game client. ...
    (comp.lang.java)
  • Re: Execute Java in a new window
    ... game program Andromeda Online uses ... > updates, then installs them, then launches the game client. ... > console window so that players can see exceptions that are thrown. ... You can modify the command line to launch the client program to redirect the ...
    (comp.lang.java)
  • Re: Execute Java in a new window
    ... game program Andromeda Online uses ... > updates, then installs them, then launches the game client. ... > console window so that players can see exceptions that are thrown. ... You can modify the command line to launch the client program to redirect the ...
    (comp.lang.java.help)
  • Re: egoban.org updates
    ... and the updates are frequent and useful. ... egoban.org has received many updates since its launch a month ago. ... Tags are an intelligent way to group games that share a common ... Game tags, which apply to an entire game. ...
    (rec.games.go)
  • Re: A day without an update...
    ... start islands, a lot of expansion islands, and food, and an update ... Or would you rather play in a game were everybody was ... I prefer mediumly spaced island games, but without food. ... 30-40 updates, or approx 2.5 months. ...
    (rec.games.empire)