[Java] Runtime probleempje

Pagina: 1
Acties:
  • 46 views sinds 30-01-2008

  • D-RiSe
  • Registratie: September 2000
  • Laatst online: 19-03 19:37

D-RiSe

Kick the baby

Topicstarter
ik heb de volgende code

code:
1
2
3
4
5
6
7
  public void startQuake(Q3Server s) {
    try {
      Runtime.getRuntime().exec("c:\\quake3\\quake3.exe + connect " + s.getHost() + ":" + s.getPort());
    } catch(Exception e) {
      e.printStackTrace();
    }
  }


het probleem is dat quake nu om zijn cfgtjes e.d. gaat zoeken in het classpath van mijn app.. oftwel die gaat op z'n bek...

is er een manier om aan te geven dat quake in c:\quake3 moet draaien en niet in c:\dev\java\q3testje?

intel silver reef, celly 2.0 Ghz, 256mb ddr, G2MX


  • .oisyn
  • Registratie: September 2000
  • Laatst online: 22-08 13:19

.oisyn

Moderator Devschuur®

Demotivational Speaker

lees de docs!
exec(String command, String[] envp, File dir)
Executes the specified string command in a separate process with the specified environment and working directory.

Give a man a game and he'll have fun for a day. Teach a man to make games and he'll never have fun again.


Dit topic is gesloten.