Q:

create software that make my file all time being used

I want to create software that can make my file all time being used to prevent copying. means whenever someone try to copy it it will show that file being used somewhere else. I seen this type of software in some places. that will make file  uncopyable. it will make it all time used. means all file being opened somewhere so you can't copy it.
I want make this type and store it in sd card. so whenever any one use my sd card in his computer than it will show a being used error. means whenever he attach sd card to computer. file will automatically opened somewhere.

A:

Never tried this before but create a service class and open the file in the service using an input stream
File file = <filepath>

InputStream in = null;
try{
 in = new BufferedInputStream(new FileInputStream(file));
 ...
finally {
 if (in != null) {
   in.close();
 }

}
 }
Not sure if it prevents copying or not

