Tuesday, January 13, 2015

The action can't be completed because the file is open in java(tm) platform se binary - not able to delete a file

This usually happens when after you stop running a program, you open the directory on your hard drive to delete the jar file. Even though the program stopped running, the jar file is still open in Java virtual machine.

IDE
If you are running the program in a Java development IDE, check the Output pane to make sure that all related executions are terminated and removed. If this does not solve the problem, close and reopen the IDE shall get it resolved.

Windows
If you are using Windows, you can open the Task Manager by press the three key Ctl+Alt+Delete at the same time. Look at the Applications tab and the Processes tab to end all the java processes.

You can also open the command line and type 'tasklist | grep java' to get all the running java programs. Terminate all the related java programs by command 'taskkill /F /PID pid'.

UNIX/Linux
If you are running on a UNIX/Linux terminal, use 'ps -ef' to get all the processes, and then use 'kill -9 pid' to kill all the programs that use the file you are trying to delete from the folder.

If none of the above works, log out and re-log in your computer will be sufficient to solve the problem. It should not go that far that requires you to reboot your computer, even though that will definitely fix the problem.
       
-----------------------------------------------------------------------------------------------------------------------

                        
If you have ever asked yourself these questions, this is the book for you. What is the meaning of life? Why do people suffer? What is in control of my life? Why is life the way it is? How can I stop suffering and be happy? How can I have a successful life? How can I have a life I like to have? How can I be the person I like to be? How can I be wiser and smarter? How can I have good and harmonious relations with others? Why do people meditate to achieve enlightenment? What is the true meaning of spiritual practice? Why all beings are one? Read the book free here.

8 comments:

  1. Helpful. Its worked for me.. Thank You

    ReplyDelete
  2. Thanks. It helped. In IDE, I cleaned up the current running activities.

    ReplyDelete
  3. Thanks for all the comments. You are welcome. I am glad it helps.

    ReplyDelete
  4. THANK YOU!! simplest and best solution. Thank you for sharing your expertise. The book looks interesting also.

    ReplyDelete
  5. Thank you SO MUCH!

    ReplyDelete