Can i get the particular disk space(like C: ) using Jav program..?

Posted by Venkats on Stack Overflow See other posts from Stack Overflow or by Venkats
Published on 2010-03-21T04:48:36Z Indexed on 2010/03/21 4:51 UTC
Read the original article Hit count: 153

Filed under:

I used SystemEnvironment class in java for getting system information.

In that i can get only RAM size, i can't get the specific disk space like c: and D:

code is,

com.sun.management.OperatingSystemMXBean mxbean = (com.sun.management.OperatingSystemMXBean)ManagementFactory.getOperatingSystemMXBean(); System.out.println("Total RAM:"+mxbean.getTotalSwapSpaceSize()/(1024*1024*1024)+""+"GB");

Can i get this using in java program?

© Stack Overflow or respective owner

Related posts about java