• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to get DiskID  RSS feed

 
pan lei
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would like to get c drive serial number,who have time to give me an example paragraph,please help me
 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
pan lei wrote:I would like to get c drive serial number,who have time to give me an example paragraph,please help me


AFAIK, this is hardware dependent, and thus something that Java isn't built to do. You may have to do this in C and then create JNI code to bridge the C DLL and functions with your Java app.
 
Praveen Rajendran
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I guess we can do this in java itself without using JNI but by executing a vb script within java code

Sample code that i tried to pull the seral number for my C and D drive is given below. Let me know if this helps.

 
pan lei
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you for Praveen Rajendran's answer.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!