Eclipse failed to remove error

I am working on a project with Eclipse, and now everything was fine, but the last time I tried to build it, it returned an error,

"The project was not created due to" Failed to delete "/ Torpedo / bin / bin". Fix the problem, then try updating this project and creating it, as it may be inconsistent. Torpedo Unknown Java Problem "

And he deleted the bin folder, which stores all the images and everything necessary for the program. (Fortunately, I had a backup). I tried using it on Google and tried to find every solution I found, but nothing helped, and most of them suggest deleting the folder manually, which I cannot. What should I do?

+49
java eclipse build
Apr 18 2018-10-18T00:
source share
28 answers

I see this semi-regularly on Windows. I think this is a bug or a race in Eclipse, maybe a race with an antivirus that does not like deleting immediately after writing to the same file that was deleted. The fix I'm using is to use Project-Clean in the menu bar.

@Ash is right in the comments above that you should not have resources in the output folder. To avoid this, I always change the name of my output folder from "bin" to something more obvious, for example, "eclipse / classes"

+28
Apr 18 '10 at 5:45
source share

I have this problem semi-regularly, especially when deploying to Tomcat, etc. on Windows 7. This also happens to me and the maven command line, so it's not just Eclipse that has this problem.

The main reason is because something is holding onto a file descriptor. Most of the problems went away when I turned off window search / indexing on my PC, but sometimes problems still arise.

To keep track of what’s going on, you need to download Process Explorer (one of the most useful programs I've ever come across). This allows you to see exactly what is running on your PC, open files, process performance, number of processors, number of I / O operations, etc. When you have a file that cannot be deleted, you can find-> Find a pen or DLL and enter part of the name, and this will give you who opened it. You do not always catch it on time, but often enough to know the culprit.

enter image description here

+22
Sep 29 '11 at 17:55
source share

What works for me:

  • Close Eclipse.
  • Go to the bin folder and delete all the contents ( not the folder itself).
  • Launch Eclipse.
  • Clean the project by going to Project -> Clean .
  • Make sure you check Project -> Build automatically .
+11
Jul 01 '13 at 14:30
source share

This is a Windows 7 issue. We generate a lot of code here and face the same problem when generating the code [two steps:

  • XSL conversion and
  • pretty-printing], one of the Windows processes, possibly Explorer.exe , is interfering. This happens only once out of 200.

On Linux and Windows XP, we have no problem with Eclipse or file generation.

And we run into problems even when starting code generation and Eclipse as an administrator.

We asked Microsoft for support, but the offer we have had so far is "Restart!" Hopelessly!

+4
Sep 11 '12 at 12:11
source share

The problems with deleting things for me under Windows usually come down to one of two things:

  • File opened by program. This includes the JVM. Usually this does not disappear on its own.
  • The antivirus program on the computer has a file open for everything that it needs. This usually happens after a while. I often create workspaces, and if this happens too quickly, Eclipse complains that it cannot delete files.
+3
Apr 18 2018-10-18T00:
source share

Check if any other file uses the file in the target bin folder and kills it. This usually happens with other Java processes called from Eclipse.

+2
Aug 11 2018-11-11T00:
source share

I had a similar problem with Windows XP / Vista. In my case, the total file length was more than 255 characters.

/ABCD/ABCD/ABCD/ABCD..../ABCD

The only solution I found was to rename directories so that it was shorter than 255 characters.

/a/a/a/a/a/a/a.../a

After that you can delete it. This is a limitation in the windows API. The file system can manage over 255 characters, but not the explorer that uses api windows.

+2
Sep 30 '11 at 6:29
source share

I had this problem, and it was TGitCache.exe that blocked the bin folder. If you are using TortoiseGit, just run the TGitCache.exe process and everything should be installed.

+2
Aug 08 '16 at 14:46
source share

I had this problem ... and this was due to the fact that I had a command line session (DOS screen ...) open in a folder in the BIN tree for the project I'm building ... I wanted to run the file. class through the command line.

The solution was simply to return to the bin folder so that the clean one could delete and recreate these target folders.

+1
Aug 11 '10 at 11:28
source share

It happened to me. I had User Access Control (UAC) disabled when this happened (Windows Vista 32 bit). I turned on the jab again, rebooted vista, and then the error went away. The counter is intuitively clear that when UAC is turned off, deleting the bin / net directory fails, but it works with UAC. Hover over your mouse.

+1
Aug 26 '10 at 19:23
source share

The process I followed

  • Close eclipse
  • Explore the folder
  • Delete it
+1
May 10 '12 at 20:55
source share

I had this problem recently. I realized that this started after I set up the workspace to automatically reload all resources from disk. This can be configured in the menu: "Settings"> "General"> "Workspace".

+1
Apr 10 '13 at 10:14
source share

I was working on an open source project, and this particular problem was a real pain in the ass and ended up wasting 4 hours.

What the eclipse is trying to say:

I do not have permissions for a specific bin folder. If you are using linux, then:

  • Open terminal
  • Go to the directory where you import the project for the eclipse and chmod 777 -R project_folder
  • Try again if the problem still persists, go to the folder in your project where bin is located and do the same - chmod 777 -R bin_folder
  • Now open the eclipse, clean and build again. It should work smoothly
+1
Nov 09 '13 at 20:09
source share

Solution (for me): In my case, the file no longer existed wherever it was linked, so the file could not be found (obviously). All referenced files are in the path in my src folder somewhere or in other local projects. Nothing has worked for me so far except the following ...

How I managed to remove my broken links.

  • Open Eclipse, open a project
  • Go to the folder (in Explorer) that the file refers to.
  • Create a file (empty / empty) with the same name as the file (for example: "File.java").
  • Return to the eclipse and update project.
  • Now you can delete the file that is currently located.

Link deleted.

This is a dirty workaround. I hope this problem is resolved.

+1
Jun 20 '15 at 20:29
source share

just adding a knowledge base. I had this problem. restarting eclipse or windows did not fix it.

removing .metatdata / .lock in the parent directory after closing eclipse fixed the problem. iirc, sometimes you need to restart windoze.

+1
Jun 27 '15 at 1:37
source share

1 - Clean up the project by selecting Project → Clear .

2 - Make sure you check Project → Create automatically .

But before that, check the permissions in src and the target folders of your project, eclipse must be read and written to these folders, and then release the permissions for it, your problem will be solved.

+1
Nov 14 '16 at 11:25
source share

I had the same problem. After restarting Eclipse, one uninstall passes for me, and then subsequent uninstalls fail. Finally, I decided to restart Eclipse, then Ctrl + click for each item I wanted to delete. Then I deleted them all at once, and it worked fine.

0
Apr 16 2018-11-11T00:
source share

In windows I opened eclipse using admin privilige. The problem is gone.

0
Sep 27 '11 at 13:34
source share

I have not read all the previous answers, but I have the same problem too. I am running Eclipse 4.1 on Ubuntu 12.10, 64 bit and SSD. I realized that this removal problem always occurs when my computer crashes with open Eclipse. I was able to solve the problem by deleting certain index files. For example, a workspace log file (located in /.metadata/.log) is populated with an EOFException, saying that some metadata cannot be read, for example

 !ENTRY org.eclipse.ui.ide 4 4 2012-12-13 13:25:35.988 !MESSAGE Problems occurred refreshing the selected resources. !SUBENTRY 1 org.eclipse.core.resources 4 567 2012-12-13 13:25:35.988 !MESSAGE Could not read metadata for '/home/xyzworkspace/.metadata/.plugins/org.eclipse.core.resources/.projects/server-test/.indexes/7/9c/properties.index'. !STACK 0 java.io.EOFException at java.io.DataInputStream.readByte(DataInputStream.java:250) at org.eclipse.core.internal.localstore.Bucket.load(Bucket.java:298) at org.eclipse.core.internal.properties.PropertyBucket.load(PropertyBucket.java:258) at org.eclipse.core.internal.localstore.Bucket.load(Bucket.java:274) at org.eclipse.core.internal.localstore.BucketTree.internalAccept(BucketTree.java:98) at org.eclipse.core.internal.localstore.BucketTree.internalAccept(BucketTree.java:109) at org.eclipse.core.internal.localstore.BucketTree.internalAccept(BucketTree.java:109) at org.eclipse.core.internal.localstore.BucketTree.accept(BucketTree.java:76) at org.eclipse.core.internal.properties.PropertyManager2.deleteProperties(PropertyManager2.java:102) at org.eclipse.core.internal.properties.PropertyManager2.deleteResource(PropertyManager2.java:111) at org.eclipse.core.internal.resources.Resource.deleteResource(Resource.java:918) ... here goes the rest of the stack trace... 

After deleting this particular index file and restarting Eclipse, everything still worked. Any feedback on whether the job works is appreciated.

0
Dec 13 '12 at 12:47
source share

I had to finish the chronograph before I could clear my project. There were processes in the task manager that needed to be closed.

0
Apr 23 '13 at 21:30
source share

Process Explorer showed that a Java.JAR Java file that cannot be deleted was used by javaw, an Eclipse subprocess ...

This seems like a mistake.

The workaround is to close Eclipse and delete the file from Explorer ...

0
May 9 '14 at 12:31
source share

I followed these steps to get rid of this:

  • Close eclipse
  • Go to task manager -> processes -> java.exe -> end process
  • select javaw.exe → end process
  • Then go to the project location, delete it
  • run eclipse and delete the project

welcomes ... what is it ..

0
Jul 05 '14 at 10:37
source share

It just hit the same problem: it was not possible to clean / rebuild the Eclipse project, because it was not possible to delete the output folder of my classes.

I closed Eclipse and tried to delete the folder. Windows complained that it was being used by another application.

Being on Windows, I run resmon.exe from the Windows / Search panel. Then, going to the CPU / Associated Handles tab, I search for this path to the folder, and I found a handle to it from OUTLOOK. I sent an email with the file from this path, and it seems that OUTLOOK saved it. After deleting the descriptor record, everything worked again.

0
Nov 26 '15 at 13:48
source share

Sometimes this can be solved simply by cleaning the project and restoring it. It used to work for me.

In addition, clicking “Automatically create” on the “Project” tab is usually more convenient for solving small problems.

0
Jun 06 '16 at 10:01
source share

This works for me:

  • Close Eclipse.
  • Delete from the Eclipse folder in your project, all the data inside the classes.
  • Open Eclipse.
  • Command -> CleanUp
0
Jan 30 '17 at 10:04 on
source share

I fixed this by disabling Windows search indexing. I seem to remember quite a long time ago, I tried to search the project folder using the Windows File Explorer. I think that the windows have kept the search index up to date since then, scanning the folder and now throwing heads with clean eclipse.

To disable:

  • Control Panel
  • Administration
  • Services
  • Find "windows search"
  • Turn it off

Since the windows search is broken, I don’t use it anyway. I use ransack agent to search.

0
Mar 09 '17 at 11:09 on
source share

Update Spring Boots!

I had the same problem when my Spring toolbox threw this error [Windows 7] whenever I make changes to JSP or resources (css, js, images). This will allow you to save at least once the reflection of the changes, but the second time STS will throw an error so that it cannot delete the file that I changed [basically it was not possible to move the file to the bin folder]. I have to stop the application, make the project → clean for error, go in, make changes and start the application. The process guide said javaw has a handle to the bin .

I tried all the suggestions that are listed as answers. - Restored the workspace, checked links to projects, updated the Spring toolkit, disabled window search, indexing, etc. But no one worked.

Finally, I upgraded my Spring boot from 1.4.0 to 1.5.4, and the error went away. Therefore, if any of you are using Spring Boots that are experiencing this problem, check your version and update it. You may also need to add spring-boot-devtools to enable hot spring-boot-devtools with the latest Spring versions to boot.

0
Jun 28 '17 at 13:57 on
source share

This problem came to me when the resolution of the project directory was changed. Make sure that the user has permission to write to the project directory. If there is no write permission to the project directory, eclipse will not be able to delete / create the bin folder.

To resolve this, I gave permission to write to the Project directory.

Ex: sudo chmod -R 777 / MyProject / code (In my case, I used Ubuntu, according to the OS, make sure you give write permission)

0
Jul 07 '17 at 6:56
source share



All Articles