🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.java
Article #141722

Re: Jak uzyskać ścieżkę dostępu do aktualnego katalogu jako String?

#141722
From: pluton
Date: Fri, 17 Oct 2008 08:55
11 lines
1414 bytes
> Mam następujący problem: muszę znaleźć jakiś sposób, by do zmiennej
> Stringowej zapisać ściezkę dostępu do aktualnego katalogu. Problem w tym, 
> że katalog jest pusty. Gdyby nie był pusty użyłbym klasy File i odpalił 
> getCanonicalPath()...

Jezeli chodzi ci o miejsce, z ktorego odpalono komente ;java; ,
to chyba    String currentDir = System.getProperty("user.dir");

pozdrawiam
pluton 
Technical Details
Message-ID: <gd9jvh$ihv$1@inews.gazeta.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
References: <gd7p0e$ghi$1@atlantis.news.neostrada.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
From: "pluton" <zielonadupa@gazeta.pl>
Newsgroups: pl.comp.lang.java
Subject: Re: Jak uzyskać ścieżkę dostępu
 do aktualnego katalogu jako String?
Date: Fri, 17 Oct 2008 10:55:52 +0200
Organization: "Portal Gazeta.pl -> http://www.gazeta.pl"
Lines: 13
Message-ID: <gd9jvh$ihv$1@inews.gazeta.pl>
References: <gd7p0e$ghi$1@atlantis.news.neostrada.pl>
NNTP-Posting-Host: 137.122.225.195.static.bait.pl
X-Trace: inews.gazeta.pl 1224233777 19007 195.225.122.137 (17 Oct 2008 08:56:17 GMT)
X-Complaints-To: usenet@agora.pl
NNTP-Posting-Date: Fri, 17 Oct 2008 08:56:17 +0000 (UTC)
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
X-Priority: 3
X-RFC2646: Format=Flowed; Response
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-User: zielonadupa
X-MSMail-Priority: Normal
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit