Format Drive With Java (Windows )


Format Drive With Java is simple application made to format windows drive.if you are going to make some utility for windows in java or a small project in java then this small application may help you.Source code is free to download.


This project is compiled with netbean 6.9.1. So open it with netbean for quick view.
The trick of format drive in java is exactly the same as in Format drive in C#.
It is totaly based on DOS commands to format a drive. We execute DOS commands to format a drive and provides the necessary parameter like.

  • Drive Letter
  • Speed (Quick,Normal)
  • File System

These parameter provide by this project UI.Below is the special function needs to perform format a drive in java.

First we need the lists of all windows drive so.
Java code to get the list of all windows drive internal or removable.

 

Now all others parameter like format should be quick or normal, file system should be NTFS or FAT32 and what would be the labl of drive after formating.
these all parameter can provided manually through its UI.

For execute format command we will create a batch file which consist of format cammands. Then we will execute this batch file so..

Function to create a batch file consist of format commands

Format Drive With Java

Text Version of the code:

 

and finally the last to execute that file is the below

Format Drive With Java

Text Version execute batch file contains format commands:

 

Download source code for free 🙂

[social_lock]https://docs.google.com/file/d/0B5_vqAol5ENfc2Y0eUxrb09HQlU/edit [/social_lock]

,