OS Independent Code for show cid sd card

I have been working with some JAVA Code which used to identify cid of SD card but when I connect to my computer through via USB on Ubuntu OS the cid is not displaying means I am unable to do that on Ubuntu now I want a code which show cid SD card on Ubuntu or independently for any operating system kindly suggest some ways?
