Download Process Explorer and run the program.
Option 1:
Click the Find menu, and choose Find Handle or DLL...
Type the file name (in your case JDB.mdf)
After typing the search phrase, click the Search button
Once you know what process the file has locked you, need to close that process (by closing that program). Another option is to use KILL in the process explorer terminating that process.
Option 2:
From the error message, the .mdf file has already been attached to an instance of an SQL Server. If you have multiple instances running, make sure it is detached from any other instance.