getApplicationPath() ?

Status
Nicht offen für weitere Antworten.
L

Louis2

Gast
Hallo,

wie kriege ich den Pfad raus wo das Programm gestartet wird ? .getApplicationPath() gibt es in Java 1.4.2 oder 1.5 ja nicht mehr (oder bin ich blind :? ).
Durch was wurde es ersetzt?
 

8ull23y3

Bekanntes Mitglied
Probier mal

Code:
System.out.println(System.getProperty("user.dir"));

aus!

[edit] :shock: hatte ne klammer vergessen puh grad noch so geschafft[/edit]
 
L

Louis2

Gast
Perfekt hier die Lösung

Code:
System.out.println(this.getApplicationPath());
.
.
public String getApplicationPath()
{
    return System.getProperty("user.dir"); 
}
 
Status
Nicht offen für weitere Antworten.

Oben