This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes IDEs, Version Control and other tools and the fly likes Fixing a borked Eclipse install Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Fixing a borked Eclipse install" Watch "Fixing a borked Eclipse install" New topic
Author

Fixing a borked Eclipse install

Jim Venolia
Ranch Hand

Joined: Sep 07, 2013
Posts: 154
    
    2

tl;dr Basically, right now everything is an android project, even my Java stuff. I can't find a workspace view to choose between projects. File->Switch Workspace just gives "Other", choose that and it's pointing to my workspace. Open HelloWorld.java in the editor, try to build, get a menu with 2 identical lines dealing with "use Ant build". Choose one, says it can't find an ant something or other. Makes sense, I have no idea what ant is and never needed one before.

Could the problem be that I just copied my java workspace from the old lappy to the new one, with the new one having a different path (cygwin vs cygwin64)?

System is Windows 8.1, fully updated.

Details.

I recently got a new laptop. Installed Eclipse, was installing the Android plugins when Windows finished installing it's patches and wanted to restart. I clicked OK. Oops

Reinstalled the droid plugins, said they were already installed. Then why won't you use them?

Uninstalled the droid plugins, reinstalled. Still won't run.

Removed Eclipse and droid plugins,plus workspace/.metadata. Reinstalled, now it's worse than ever.

I'm a Java newbie, an Eclipse newbie, a long time hater of IDEs (long story), prefer cygwin command line. Javac and java from the command line work fine, but now I need a debugger (got a thread that won't start for some reason).

Wat do?


It's a no-brainer. We just need to take it to the next level to turn this into a win-win situation. The best practice is to get rid of the low-hanging fruit first. Ping me with an agenda so we can go flag up on this thing
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1648
    
    7

Start over

Download the ADT bundle with the tools already installed. Unzip it and you are good to go.

More on that here:
http://developer.android.com/sdk/installing/bundle.html
http://developer.android.com/sdk/index.html


[How To Ask Questions][Read before you PM me]
Jim Venolia
Ranch Hand

Joined: Sep 07, 2013
Posts: 154
    
    2

I did. Twice.

There is evidently some metadata stored somewhere I'm not aware of that is borking a fresh install, I'm wondering where that is.
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1648
    
    7

deleting the directory that you unzipped the distribution to should be it... Except your workspace. When you started eclipse it asked you for a workspace go into that directory and delete the .settings, .metadata folders or alternatively just delete the whole directory.

Also in the root of your project directory will be a .project and .classpath file delete those as well.

Once you have deleted the workspace and install directory, start again. Unzip the distribution and start eclipse. It will ask you to choose a directory for you workspace do that (that directory should be empty). Copy your hello world android project into that folder (the .classpath and .project files should be gone). Once that is done go to file import -> android project and import your existing android project.

The only other thing that might bite you is Android requires java 1.6. You will need that JDK installed. If your primary jdk is 1.7 you may need to explicitly tell Eclipse where your java 1.6 jdk home directory is. The easiest way to do this is close eclipse and go to its install directory and open up eclipse.ini

add this right after the line that says 'openFile' add the following



Of course you need to change that to the right path.

If you still have more issues tell us specifically what you are seeing after this and also what OS you are running (mac, windows, linux etc)

Edit* I see you told us already so your path will be something like this, no quotes they must be on 2 lines. I cant remember if Windows is fine with the bin folder or if it requires the /javaw.exe at the end of that.

Jim Venolia
Ranch Hand

Joined: Sep 07, 2013
Posts: 154
    
    2

Got it. The answer was as simple as File->new->[Java|Android] Project for all the projects in my workspace.

I'd been assuming it would see all those subdirectories and show them as independent projects (which they are).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Fixing a borked Eclipse install
 
Similar Threads
how install in Eclipse(Java/Android) emulator for Tablet PC Android
ANT TOOLS I reinstalled for phonegap command line AND NOW NOT CAN RUN PROJ Neither netbeans nor ecli
eclipse ide problem to find installation error. please help.
Using CVS command line in Eclipse?
eclipse build from java source slow...