The Artima Developer Community
Sponsored Link

Java Answers Forum
Free space of harddisk

3 replies on 1 page. Most recent reply: Feb 13, 2003 10:56 AM by Matt Gerrans

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 3 replies on 1 page
Hien

Posts: 3
Nickname: hienltth
Registered: Jan, 2003

Free space of harddisk Posted: Feb 11, 2003 9:19 PM
Reply to this message Reply
Advertisement
Is there any way to be able to determine the total space and available free space of all harddisk in Java?(Do not use native code-100% pure java)
Thanks!


Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: Free space of harddisk Posted: Feb 12, 2003 1:04 PM
Reply to this message Reply
Yes, you use 100% pure Java to determine what platform you are using, then use JNI for that platform. Many platforms don't even have disks and many that do don't represent them as drive letters, as DOS/Windows does.

Hien

Posts: 3
Nickname: hienltth
Registered: Jan, 2003

Re: Free space of harddisk Posted: Feb 12, 2003 8:50 PM
Reply to this message Reply
Thank you, a "Stupid" Answer, :lol:
If you use JNI, you must write native code for each platform. And you lost the Java platform-independent power. And, your program is not 100% Pure Java.

Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: Free space of harddisk Posted: Feb 13, 2003 10:56 AM
Reply to this message Reply
The point I was trying to make was that the idea of "disks" doesn't exist on every platform, so it is a platform-dependent question.

Flat View: This topic has 3 replies on 1 page
Topic: kmeans algorithm help Previous Topic   Next Topic Topic: Compiler Written in Java or C++

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use