Hello,
I need help! I would like to recognize type of drives in java program.
I have been looking for solution on the whole internet, but I found nothing.
Can anybody help me?
Thanx.
Printable View
Hello,
I need help! I would like to recognize type of drives in java program.
I have been looking for solution on the whole internet, but I found nothing.
Can anybody help me?
Thanx.
If you mean distinguish between those types of file systems then the answer is that standard Java is not supposed to know about those things. The best you can do is
to get all the various roots you've got and manipulate them but Java won't tell you if one is your CD/ROM or your DVD/ROM.Code:System.out.print(Arrays.toString(File.listRoots()));
At first thanx for reply.
Code you have entered I know and I use it.
I do not need to distinguish if one is CD/ROM or DVD/ROM, but almost the same, I need to distinguish if it is HHD or CD/ROM (DVD/ROM), removable disk, etc...
Is this impossible too?
Nope, I don't thinks that's possible using standard Java.