How to remove a version of eclipse from workspace? - java

I have downloaded a new version of eclipse, but now I can't open it because there is another version of eclipse attached to the workspace. I was thinking of deleting the older version but am scared of loosing work. Just wondering what I should do.

Delete the .metadata folder and import your project in your other version of Eclipse.
Make a save of this .metadata folder first just in case you need it

As suggested by #GPRathour download portable version of Eclipse & then import your existing projects into new environment. While doing this uncheck copy projects into workspace option. No need to delete existing. By doing this you can use both Eclipse.
Eclipse uses .metadata folder as well to store internal files and data structures. And many plugins store their settings in here to. Consider the content of this folder as a ‘black box’: so do not change it, do not touch it unless you really know what you are doing!

Related

How to add a new folder from the disk, into an Eclipse project?

On searching, all I get are results for how to import an existing project into Eclipse. My problem is different.
I have a war file which I imported to Eclipse. Now I want to add nvd3's files to the project, and have placed nvd3's folder in the WebContent/scripts/lib folder on the disk. Now there seems to be no way to make Eclipse recognize that the nvd3 folder exists there. There seems to be no way to add it either in Eclipse. Using the JavaEE version of Eclipse Kepler.
Follow these common steps...
1) Select root directory of the project
2) Right click on it.
3) Click on Refresh
There you go.... :)

how to import-back a deleted project from same eclipse workspace

It looks basic question but i don't have solution,
Long back, I soft deleted(physically project in workspace directory) from eclipse workspace.
I am trying to import that project now. It is saying project already in workspace.
So I am doing copy that project from workspace to other location and, deleting that project from workspace. And importing that project to workspace back. This way, It working fine.
But do you have any better idea than this....
If you deleted the project from the disk your best bet would be to restore it from the recycle bin. Otherwise you might need a data-recovery tool.
If the project is completely deleted and you're still getting the "already in workspace" message, check your projects folder. You might have a similarly-named project that was deleted from Eclipse but not the workspace folder.
Go to import, then import existing project , and select your project folder present on the disk, Now this is important , Uncheck the copy projects into workspace checkbox, and then click refresh button. Now you will be able to import the project.
Edit:- This will work assuming you deleted project with default settings, which means the checkbox Delete contents from disk was not selected , and the files are still present on your HDD.
Go to import, then click on "General->Existing Projects into Workspace" , then select your project root directory present on the disk. Make sure the project folder path is correct. Unchecked all the "Options" checkbox.
Simply delete from hard disk where it previously belong and you are done.
Now try to Import it from anther copy (external source).

Eclipse Hell . . . Failed to read the project description file (.project)

I think Eclipse is trying to make me miserable. A couple of hours ago, my project was working and compiling well. Suddenly that all changed. Eclipse somehow wipes out all changes I have made to my files(activity, manifest etc.) I make sure to save often but when I go to run the project, I get the error that I have a build error. I checked and there was none, so I go to close Eclipse, so I can reopen and see if the errors will go away. Instead what happens is Eclipse wipes clean all my files and I end up with a project on disk with lots of blank code files. I try to run anyway, and I get the error message below.
Failed to read the project description file (.project) for 'com.example.android.nfc.simulator.FakeTagsActivity.FakeTagsActivity'. The file has been changed on disk, and it now contains invalid information. The project will not function properly until the description file is restored to a valid state.
Anyone have an idea what in the world this is about and how I can rectify this?
I would recommend to wipe out all the eclipse related configuration files(make sure you take the backup if you have manually made some changes in those) and import the project again, by following
File -> Import... -> Existing Project into Workspace
Make sure you take the backup of whole project before doing this.
When Eclipse gets stuck in some obscure status, I usually find useful to recreate the .metadata folder in workspace directory. It is a drastic solution, but it usually works for me. After that you can reimport all your projects.
This happened to me because I had a conflict in my .project file. I opened it up in a text editor and fixed the conflict (in my case, removed from ====... to >>>branch..., as well as <<<HEAD) and then I was able to open the project in eclipse.
I was just encountering this same issue (using Zend Studio 12, which is built on Eclipse). My problem was that I was creating a project from a Remote Server, and I was just downloading everything, which also included the .project file from the old project. It wasn't showing this error until I'd closed the program and tried to open it again (which usually wasn't until the next day).
I seem to have resolved it by making sure not to download the .project when initializing the project.
If the .project file is a text file, so if you have it in version control you might want to copy it over from there.
Before you trying the following make a backup of your current project state.
Assuming you don't have an old copy, you can open it in a text editor and try to see if there is something obvious wrong.
If this fails, copy the source files of your project to a fresh location (without the eclipse configuration files) and import it as a new project into eclipse.
if you still have all of your other source (.java files, AndroidManifest.xml, resources), you might be able to get your project back by simply going to the folder containing the project, removing the .project file that you say is now empty, and then using the new project wizard to recreate the project (and .project file) for you from your existing tree of source.
from the menus, select File -> New... -> Project , and then, in the first dialog, choose Android Project from Existing Code .
if you had done anything special to the .project (reliance on specific .jar files or changes to classpath), you may have to re-do these steps after you re-create your project; but at least it should pick up the code you already have.
If all the files are empty, and you have no working Backup, I can't help. I would recommend to use proper version control in the future.
Use git or mercurial, they have nice UI integrations (see tortoisegit/tortoisehg).
To decouple the build process and library management from eclipse, take a look at maven or gradle, this might help you in future projects.
If you use git, complete the merge e.g. del the head in your androidmanifest.
I also got the Same Issue in Eclipse but the real problem is i removed the actual Source project folder from source location (from which eclipse is trying to take the project) to some other place hence my eclipse is unable to get web.xml file since it is not available. Now i changed my source project folder location to the path where eclipse is trying to search for. Issue Resolved for me.
Just delete the 'servers' folder in your workspace and try again.

eclipse workspace synchronization via dropbox - move the .metadata folder

I'm a student and have to work with Java and Eclipse. As we have teamprojects i have to sync my workspace with other students. The only problem i have is a folder called .metadata, right above my workspacefolder. Is there any possibility to change the path of this folder so that it won't be synced?
You can sync your project folder instead of the whole workspace.
If you want to share multiple projects you can put them in a sub-folder of your workspace and share only this sub-folder.
BTW, I recommend you using a real SCM like GIT or SVN that give you opportunity to ignore some file/directory.

When does Eclipse copy resources to the output folder?

I noticed that "sometimes" the resources i put into a source folder in my Eclipse project will not be copied to the output folder ("bin") immediately.
E.g. i change a properties file using the eclipse editor and save... and "bin" still has the old version.
Does anyone know what exactly triggers the copying (and how i can trigger that from a plugin)?
I thought it happened automatically when a resource changes.
-- EDIT --
To clarify what i meant by triggering it from a plugin: I have a plugin that depends on up to date resources in the output folder, but apparently the resources are outdated when my plugin is called. And that's why i need to better understand what happens and how i can force it when i need to.
If you don't add the resource through eclipse (but for instance through the windows explorer), eclipse wont notice some changes until you refresh your project/folder. (right click in the packater explorer for instance).
After it notices the change it will copy it to the output folder when you build (often this is done automatically upon changes)
This is a Bug in almost all Eclipse versions, it happens without any reason. My eclipse 3.5.2 and 3.6.2 both meet this problem in someday. In my case, I need to copy modified .clj clojure source files to classes directory for immediate effection in a web app, now I have to set /src before /classes in CLASSPATH of web appserver startup script, It's solve my problem temporarily.
As #Thirler said, if you don't add the resource through Eclipse, it may not notice the files until you refresh your project. However, if the Refresh/Clean doesn't work (in my case, it didn't), you have to add the files to the folder structure IN ECLIPSE.
Just drag the file from the folder where it is in the file system using Finder/Windows Explorer, drop it into the same folder in Eclipse's Project Explorer (Eclipse will ask for overwriting, just say yes) and Voila!
EDIT:
An easier way is to just navigate into the folder using Project Explorer and then Refresh (F5).
As far as I know it happens when you build the project. You don't need a plug-in, you just need to tell eclipse to do a build of the project.
There is an Eclipse setting Java > Compiler > Building > Output folder > Filtered resources.
For unknown reasons, this was set to *.launch,*.testsuite,*.deploy,*.location,*.execution,*.datapool,*.artifact,*.html,*.svg in my workspace (while the default seems to be just *.launch). This was the reason, why my Eclipse constantly refused to copy a classpath resource index.html.
Late response, but I just stumbled over this question but non of the answers helped me to convince Eclipse to do its job.
This happened to me when I imported an Eclipse project as a whole, including both src and bin directories. The fix is to Clean the project: Project -> Clean... -> select your project and press Clean. This should re-build the project and properly locate the resources needed.

Categories

Resources