Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

applet reading drives?

Status
Not open for further replies.

russland

Programmer
Jan 9, 2003
315
0
0
CH
hi,

i'm newbie in java. how could i easily display all available drives (hard and net) in a drop down box? need to achive this in an applet (running in browser, of course). i'm using jbuilder X Foundation to get started.

what is the class, library i'm looking for? any good resources in the web?

thanks a lot for brining me up to speed.
 
this does a nice job.

File oPath = new File(path);

File list[] = oPath.listRoots();

for ( int i = 0; i < list.length; i++ )
{
File root = list;
if ( root.exists() )
jComboBoxDrives.addItem(root.getPath());
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top