Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Beginning Java and the fly likes Volume Serial number Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Volume Serial number " Watch "Volume Serial number " New topic

Volume Serial number

cameron weirs

Joined: May 29, 2001
Posts: 9
Hi! All,
can anyone tell me how to get a Volume Serial number On the Drives in a Java Application, actually i m Looking for a parallel method to getVolumeInformation(driveLabel) which is in VB .
Thanks in advance.
Aleksey Matiychenko
Ranch Hand

Joined: Apr 03, 2001
Posts: 178
Since java has to be platform independent you might have to go a JNI route.
Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521
Yeah but VB only runs on Microsoft operating systems, so it is easy to know how the volumes are cataloged. Writing such a method that would work on MS and on Linux and on a Mac, etc. would be quite amazing.
I would guess you would need to write or find some custom code.

"JavaRanch, where the deer and the Certified play" - David O'Meara
cameron weirs

Joined: May 29, 2001
Posts: 9
thanx aleksey presently i m managing in the issue uing JNI only . So i was trying to figure out if some direct support is there .

cindy , ur argumemnt is making a sense ok Vb is for microsoft platforms but we know that all platforms have their versions of JVM which are tailored to work on and in turn interact with that os. so i was thinking ...that way ..
thanx and regards ..
Arthur Lyman

Joined: Dec 30, 2000
Posts: 11
I am curious what kind of application you are developing that requires knowledge of the volume serial number. I think of Java as working at such a high level of abstraction that it would never care about volume serial numbers. It almost sounds like you are writing a utility that is by it's nature operating system specific and not a good candidate for a Java project.

Arthur E. Lyman<BR>
I agree. Here's the link:
subject: Volume Serial number
It's not a secret anymore!