Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: Eclipse Error: Could not open the editor: The file does not exist?

  1. #1
    Member
    Join Date
    Mar 2012
    Location
    Billings, MT
    Posts
    47
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Eclipse Error: Could not open the editor: The file does not exist?

    Hello everyone, I have been using Eclipse as a Java IDE for a while now and came to my first big problem. I have been creating a game for a few months now with no problems, now when I run eclipse and try to open my project and it's classes I receive an error 'Could not open the editor: The file does not exist.'

    I check the details: 'org.eclipse.core.runtime.CoreException: The file does not exist.
    at org.eclipse.core.internal.filebuffers.ResourceFile Buffer.create(ResourceFileBuffer.java:237)
    at org.eclipse.core.internal.filebuffers.TextFileBuff erManager.connect(TextFileBufferManager.java:112)
    at org.eclipse.ui.editors.text.TextFileDocumentProvid er.createFileInfo(TextFileDocumentProvider.java:55 9)
    at org.eclipse.jdt.internal.ui.javaeditor.Compilation UnitDocumentProvider.createFileInfo(CompilationUni tDocumentProvider.java:979)
    at org.eclipse.ui.editors.text.TextFileDocumentProvid er.connect(TextFileDocumentProvider.java:478)
    at org.eclipse.jdt.internal.ui.javaeditor.Compilation UnitDocumentProvider.connect(CompilationUnitDocume ntProvider.java:1243)
    at org.eclipse.ui.texteditor.AbstractTextEditor.doSet Input(AbstractTextEditor.java:4213)
    at org.eclipse.ui.texteditor.StatusTextEditor.doSetIn put(StatusTextEditor.java:237)
    at org.eclipse.ui.texteditor.AbstractDecoratedTextEdi tor.doSetInput(AbstractDecoratedTextEditor.java:14 51)
    at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor. internalDoSetInput(JavaEditor.java:2563)
    at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor. doSetInput(JavaEditor.java:2536)
    at org.eclipse.jdt.internal.ui.javaeditor.Compilation UnitEditor.doSetInput(CompilationUnitEditor.java:1 395)
    at org.eclipse.ui.texteditor.AbstractTextEditor$19.ru n(AbstractTextEditor.java:3200)
    at org.eclipse.jface.operation.ModalContext.runInCurr entThread(ModalContext.java:464)
    at org.eclipse.jface.operation.ModalContext.run(Modal Context.java:372)
    at org.eclipse.jface.window.ApplicationWindow$1.run(A pplicationWindow.java:759)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(Bus yIndicator.java:70)
    at org.eclipse.jface.window.ApplicationWindow.run(App licationWindow.java:756)
    at org.eclipse.ui.internal.WorkbenchWindow.run(Workbe nchWindow.java:2642)
    at org.eclipse.ui.texteditor.AbstractTextEditor.inter nalInit(AbstractTextEditor.java:3218)
    at org.eclipse.ui.texteditor.AbstractTextEditor.init( AbstractTextEditor.java:3245)
    at org.eclipse.ui.internal.EditorManager.createSite(E ditorManager.java:828)
    at org.eclipse.ui.internal.EditorReference.createPart Helper(EditorReference.java:647)
    at org.eclipse.ui.internal.EditorReference.createPart (EditorReference.java:465)
    at org.eclipse.ui.internal.WorkbenchPartReference.get Part(WorkbenchPartReference.java:595)
    at org.eclipse.ui.internal.PartPane.setVisible(PartPa ne.java:313)
    at org.eclipse.ui.internal.presentations.PresentableP art.setVisible(PresentablePart.java:180)
    at org.eclipse.ui.internal.presentations.util.Present ablePartFolder.select(PresentablePartFolder.java:2 70)
    at org.eclipse.ui.internal.presentations.util.LeftToR ightTabOrder.select(LeftToRightTabOrder.java:65)
    at org.eclipse.ui.internal.presentations.util.TabbedS tackPresentation.selectPart(TabbedStackPresentatio n.java:473)
    at org.eclipse.ui.internal.PartStack.refreshPresentat ionSelection(PartStack.java:1245)
    at org.eclipse.ui.internal.PartStack.setSelection(Par tStack.java:1198)
    at org.eclipse.ui.internal.PartStack.showPart(PartSta ck.java:1597)
    at org.eclipse.ui.internal.PartStack.add(PartStack.ja va:493)
    at org.eclipse.ui.internal.EditorStack.add(EditorStac k.java:103)
    at org.eclipse.ui.internal.PartStack.add(PartStack.ja va:479)
    at org.eclipse.ui.internal.EditorStack.add(EditorStac k.java:112)
    at org.eclipse.ui.internal.EditorSashContainer.addEdi tor(EditorSashContainer.java:63)
    at org.eclipse.ui.internal.EditorAreaHelper.addToLayo ut(EditorAreaHelper.java:225)
    at org.eclipse.ui.internal.EditorAreaHelper.addEditor (EditorAreaHelper.java:213)
    at org.eclipse.ui.internal.EditorManager.createEditor Tab(EditorManager.java:808)
    at org.eclipse.ui.internal.EditorManager.openEditorFr omDescriptor(EditorManager.java:707)
    at org.eclipse.ui.internal.EditorManager.openEditor(E ditorManager.java:666)
    at org.eclipse.ui.internal.WorkbenchPage.busyOpenEdit orBatched(WorkbenchPage.java:2942)
    at org.eclipse.ui.internal.WorkbenchPage.busyOpenEdit or(WorkbenchPage.java:2850)
    at org.eclipse.ui.internal.WorkbenchPage.access$11(Wo rkbenchPage.java:2842)
    at org.eclipse.ui.internal.WorkbenchPage$10.run(Workb enchPage.java:2793)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(Bus yIndicator.java:70)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(W orkbenchPage.java:2789)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(W orkbenchPage.java:2773)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(W orkbenchPage.java:2756)
    at org.eclipse.ui.internal.ReopenEditorMenu.open(Reop enEditorMenu.java:296)
    at org.eclipse.ui.internal.ReopenEditorMenu.access$2( ReopenEditorMenu.java:280)
    at org.eclipse.ui.internal.ReopenEditorMenu$3.widgetS elected(ReopenEditorMenu.java:248)
    at org.eclipse.swt.widgets.TypedListener.handleEvent( TypedListener.java:240)
    at org.eclipse.swt.widgets.EventTable.sendEvent(Event Table.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.ja va:1053)
    at org.eclipse.swt.widgets.Display.runDeferredEvents( Display.java:4165)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Di splay.java:3754)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Wor kbench.java:2696)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench. java:2660)
    at org.eclipse.ui.internal.Workbench.access$4(Workben ch.java:2494)
    at org.eclipse.ui.internal.Workbench$7.run(Workbench. java:674)
    at org.eclipse.core.databinding.observable.Realm.runW ithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWork bench(Workbench.java:667)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(Pl atformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplica tion.start(IDEApplication.java:123)
    at org.eclipse.equinox.internal.app.EclipseAppHandle. run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseA ppLauncher.runApplication(EclipseAppLauncher.java: 110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseA ppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.ru n(EclipseStarter.java:344)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.ru n(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework( Main.java:622)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.ja va:577)
    at org.eclipse.equinox.launcher.Main.run(Main.java:14 10)'

    I have never played around with any of eclipse's files nor deleted any. The files are still in both the .src and .bin files of my project within the workspace folder. What has happened? Is there any way to fix it? It would be heartbreaking if not as I spent quite a lot of time creating it. I do have some back up .txt files of earlier revisions of code though.

    Any help on resolving this issue would be appreciated, thanks!!
    Last edited by Montario; June 6th, 2012 at 04:00 AM.


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Eclipse Error: Could not open the editor: The file does not exist?

    First, right click the parent folder/package and hit refresh. Then check the actual hard drive location of the file(s) - I believe the default is within the workspace folder in your home directory. The file could be gone, but the tree not refreshed to show this. If its gone check your trash - Eclipse would not have trashed the file unless told to do so, and it would have updated the tree to reflect this.

  3. #3
    Member
    Join Date
    Mar 2012
    Location
    Billings, MT
    Posts
    47
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Eclipse Error: Could not open the editor: The file does not exist?

    Thanks for the reply,

    right click the parent folder/package and hit refresh
    I can't even find the parent folder/package in eclipse, I've tried the package explorer and navigators, there is no directory for me to find it. The files are not trashed, they are in the actual hard drive locations though, and I could even edit them in another application. I don't know what to do from here? They probably still exist?

  4. #4
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Eclipse Error: Could not open the editor: The file does not exist?

    Quote Originally Posted by Montario View Post
    They probably still exist?
    Based upon what you said in post #3 they do exist.

    When I say refresh, I meant in the Project Explorer view. I would also a) backup your project b) clean/rebuild the project c) restart Eclipse.

  5. #5
    Member
    Join Date
    Mar 2012
    Location
    Billings, MT
    Posts
    47
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Eclipse Error: Could not open the editor: The file does not exist?

    Oh ok, thank you! I managed to fix it, for some reason I needed to create the project again with the same name? I don't know why but it worked, all my classes are restored. Eclipse must have lost the path to my files.
    Last edited by Montario; June 6th, 2012 at 04:11 PM.

Similar Threads

  1. Problem with Excelapi: Error: package jxl does not exist
    By Rob Aiello in forum What's Wrong With My Code?
    Replies: 13
    Last Post: February 21st, 2012, 09:52 PM
  2. eclipse visual editor
    By kafka82 in forum AWT / Java Swing
    Replies: 5
    Last Post: October 29th, 2011, 12:24 AM
  3. PROBLEM CHECKING IF RECORDS EXIST OR DO NOT EXIST IN DATABASE
    By jimmyb0206 in forum JDBC & Databases
    Replies: 1
    Last Post: April 10th, 2011, 09:18 AM
  4. Replies: 1
    Last Post: March 24th, 2011, 08:22 PM
  5. Suddenly getting "Too Many Open File" error
    By newbie14 in forum Java Networking
    Replies: 4
    Last Post: December 12th, 2010, 11:12 PM