Program in eclipse will not open says .project file is missing - java

For Eclipse my work space is my usb drive that I've always used. I haven't used eclipse in a while so now that I'm trying to open up old projects it won't allow me to and says that my .project files are missing, but when I look at my folders on my usb there is a .project file for every project as there should be. I tried importing projects into a different work space and the projects did open up, but I'm wondering why they aren't working on my usb when that was always the workspace I've used and saved everything on. I'm a little confused and am fairly new to java programming and eclipse. Also any tips on importing/exporting projects in work spaces and using Eclipse would be great. Thanks.

What you can do here is to try and import the project, if that doesn't work open a new project and then drag all the packages into that project then exit Eclipse, it will make a new project folder for you that works.
There is nothing to worry about here, your source code is safe anyway.

Related

Eclipse not recognizing changes in code

A friend and I are working on a java project in Eclipse. Whenever we "ship" a new version we export it to a runnable jar.
It seems whenever we try to send the file back and forth (over google drive) to work on separate parts of it something gets messed up. This doesn't happen for him, but when I download the file from Google Drive, Eclipse does not recognize any change I make to the src.
It doesn't matter how many times I change the workspace, move/ rename the file, clean/ build the project. Nothing seems to be solving this problem. Any advice on why this is happening and how to fix it?
It would be infinitely better for the both of you if you looked into some kind of source control system, as opposed to a file sent through a file sharing service.
Sharing the source code in a JAR doesn't allow you to:
Keep a revision of known working code, in case something breaks
Reliably import the code
Keep track of changes (who did what to what file, etc)
Look into something that's suitable for sharing between users. GitHub and BitBucket both offer free Git hosting, which is a very popular source versioning tool.
Eclipse is probably building the new version of the runnable JAR in the project's output directory, which by default is something like %PROJECTDIR%/target. The new version of the JAR with your changes will be there, and you'll have to export them again to trade files back again. See also: How do I change a Java project's bin folder in Eclipse?
it is probably because it is not updating yours .class, try delete .class of "target" folder of your project, make clean (project - clean) and save again the changes
There are many steps where you can solved it,
Clean Project and Re-Build
Remove .metaData and .settings from Workspace
Clear cache
In my case, I have tried much more and I got to resolve it by removing Classes, test-classes folders if Its there in Target folder

How to change workspace directory when upgrading from Eclipse 32 to 64

Oops. I am admittedly new to Eclipse. I recently upgraded to Win7-64 from XP-32 (old Dell dual-processor Work station). So thought I could simply install Eclipse-64, install all plugins. and redirect Eclipse-64 to point to new workspace directory containing the old project files. Changing path is easy enough, but Eclipse package/project explorer sees nothing in my new directory. Should I cut paste all existing files and put in default directory then import to newly created directory. Should I 'package' the old files and use as class library? Should I re-install Eclipse-32 and start over? Any expert advice here would be greatly appreciated. I have read all posts regarding this issue, but believe there may me a 32/64 issue here. Hope I'm wrong and transition will be smooth. I don't want to lose access to all my 'code in progress' or go back to Eclipse-32. Thanks in advance!
Go to File -> Switch Workspace -> Other. Follow the prompts.
The Eclipse UI is complex.
I had new directory path correctly assigned in Eclipse-64. But had empty project explorer view. So cut and pasted old project folders from newly created path to default installation workspace for E64. Then 'import' message said I needed to create project folder in order to do that. No problem. Then I imported all folders from old Eclipse version to new directory path and wallah! Opened bin class file and all code is there! I may have screwed up in overwriting version info and other E32 files over existing E64 files here in new install workspace folder, but at least I know how to do this now. So thinking of re-installing E64 and 'all' plugins (a real pain), but at least I will know I am new-platform compatible and all will be good in my world. As always, thanks for expert advice here. The 'full' stack rules!

Unidentified R.java after blue screen of death

My computer crashed (Got the blue screen of death).
After that I was unable to open my project again, however, it's files were still present.
So I opened a new project and created all the files again and then copied the content inside.
Everything went well except for errors in all of my java files: "R cannot be resolved to a variable".
Additional info:
My Android SDK Build-tools are installed
The new project I created has the same name exactly, except for an aditional char "3" at the end of it [example: test3 instead of test],
and I editted the menifest file properly and also every java file to
contain the propper package name.
My R.java file is present [I'm using Eclipse, Windows7]
Would very appreciate help in solving this.
It is a quite common issue when using Eclipse for Android development but for some reasons, Eclipse isn't exit properly; re-opening the project will see the error logs of R.java ....
I suggest to remove the project from workspace (don't delete local files), copy your project source code to another directory. From Eclipse, File -> Open Existing Android Project, find the project source directory to re-add into workspace. Update the SDK version and dependencies. Usually, it should be fine at this step.
For experienced developers, I guess you know how to check file lock (#ChuongPham mentioned in comment above) and check for wrong resources references in projects manually...

Trying to get eclipse projects to import after transferring everything to new laptop

I got a new laptop and copied all my eclipse stuff from my old laptop to new one.
It was actually the same laptop model just upgraded a few things (mem, drive size, etc)
So the drive letters are the same as the old laptop.
When i originally opened eclipse i got an error message and read on this site to delete the "org.eclipse.core.resources" folder in .metedata/.plugins folder.
So that go eclipse to open.
After opening i dont see any of my projects even though the workspace is already set correctly.
So i tried importing android project and eclipse project but i get errors saying the packages are already there. even though i dont see them in the project explorer.
Whats the easiest way to get my projects back?
If you want your projects on your workspace again, you can go on File -> Import. It will open a modal, then you select General -> Existing Projects In Workspace. Now just select your root directory and it will list all of your projects to be imported.
One important thing is that this method does not import things like Working Sets. If you had your workspace customized, it won't bring any of these customizations back. Still, it is better have your projects back than nothing.
EDIT:
As it didn't work, you also can delete the .metadata folder and it will be like you never had this workspace. After that, you can try to import the projects again.

Open eclipse svn project in netbeans

OK my problem is quite simple
Im about to start working with a team of programmers, and we are using a svn repository to store our code, thy files are set up as Eclipse Project as the rest of my team all like eclipse.
However I am die hard netbeans man, I have tried eclipse Iv given it some time but we do not gel as they say.
So my question is there a combination of plugins /hacks that i can use to access a Eclipse Project from an SVN repository inside Netbeans , without corrupting the eclipse project or causing problems for the rest of my team (I would rather suffer eclipse than do this to them)
Many thanks ^_^
In NetBeans 6.8 under File > Import Project there is both Eclipse Project and Resynchronize Eclipse Projects. I'm guessing this can be used to work together with people using Eclipse.
UPDATE: How the eclipse import function works.
As NA pointed out, there is a way to import your Eclipse projects into Netbeans. However, arguably, you shouldn't be checking in IDE-specific files into your repository unless you can guarantee everybody is using the same IDE. Otherwise, I would recommend only checking in the source code, resources, and additional libraries and keep the specific files on ignore and have each individual setup their own environment.
Another alternative, is to check in the IDE-specific files in a different folder in the repository so that an individual can grab them if they need them.

Categories