I am working in a company in java platform. I want to read the unique manufacturing id of
any usb drive through java code for windows,linux and mac O.S . But I cannot able to do this.
Can any one help regarding this topic ?
thanking you.
Printable View
I am working in a company in java platform. I want to read the unique manufacturing id of
any usb drive through java code for windows,linux and mac O.S . But I cannot able to do this.
Can any one help regarding this topic ?
thanking you.
Java does not have access to host hardware without special JVM plugins which would be platform specific. You might be able to write some native code or shell scripts that java could call, but java has no hardware access directly, only what is provided to it via the JVM.
Native code is the my suggestion. Then you life is so easy in future changes/improvements.
Thanks for your response.Can you post some native code or shell scripts that java could call
to read unique manufacturing id of usb drive.
Thank you.
1. This is a forum, not a code factory.
2. Details of native code or scripts are outside the scope of this forum, which is for Java.
Did you try searching the net? at best, you may find something ready made that you can use, but at least you will be able to find an appropriate forum for seeking help.
db
ok.Can you guide me by which i can block a pen drive from being browsing from outside my software? I mainly want that no one can copy my software folder to other usb drive.I want to make the software specific to a perticular usb drive which will run only in the specific usb drive.
Even with a native approach I don't think it is quite easy job to do. Once a USB flash connect to the PC on explorer bar on Explorer you can browse it easily. All what you have to do is lock it through another application.
Search the web for file/folder locking. Do some experiments before going further.
I had made a dll in C# to retrieve unique manufacturing id of usb drive. It works in .net
platform . But now I want to use this dll in java application to retrieve unique manufacturing id . How it is possible to get the class of dll in java?
thank you
As others have mentioned, you need to read about java's native method interface.