🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #18820

Q: How can I detect disk drives on local machine from App.?

#18820
From: Jes Nielsen
Date: Tue, 21 Apr 1998 00:00
28 lines
1995 bytes
Hi
    I am trying to get the directory structure on a local machine, to put in
a tree like the one found in the windows explore, and I just can't see any
solution to this at the moment.  Maybe it's because of these long nights, or
the epoxy fumes from my boat building project. I have tried the
properties.class, but it only give me the user dir., classpath, current dir
.... not all the drivers, and the getenv method is deprecated, and when
looking in the source from the system.class all I see is a note about using
a -D parameter with the getProperties method, but this don't work either,
because getPropeties don't take any parameters.
    I have tried the File.class, and found some of the drives by looping
through a alphabet array on my windows machine, but jdk can't find my disk
drive (a:), and Cd-rom drive (e:) without a disk in them, and this is not
very machine independent way of doing it, because Unix, Sinix(Siemens Unix),
Solaris, Mac.. uses other notations.
    I know that I could use the FileDialog to navigate around in the
directory structure on any machines, but this is not the way I want use and
when I tried FileDialog in the swingset example I noticed that only the
current
drive was accessible. Why is this? Do I really have to pull my old dusty
Borland c/c++ development
tool out of garage and resolve to native methods to do this?
    Could somebody point me in the right direction, or just slap me in the
face so I can wake up, because I can't see through the fog right now.

TIA
Jes, Denmark
Technical Details
Message-ID: <6hgmc3$1hpg$1@news-inn.inet.tele.dk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,a62dbcdf5f2cf13e,start
X-Google-Attributes: gidf74b3,public
From: "Jes Nielsen" <frode_ni@post7.tele.dk>
Subject: Q: How can I detect disk drives on local machine from App.?
Date: 1998/04/21
Message-ID: <6hgmc3$1hpg$1@news-inn.inet.tele.dk>
X-Deja-AN: 346130243
X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3
Newsgroups: borland.public.jbuilder.java.language