How do I completely uninstall Eclipse so I can sort out my Subclipse trouble? - eclipse

I am having trouble finalising the installation of Subclipse into my Eclipse installation.
First some background: I installed Eclipse in 64-bit Ubuntu (in a VM). I tried to install Subclipse but on the final screen, the button to finish was greyed out (apparently this is a known unresolved issue). I cancelled the installation.
The problem is that when I tried to add the plug-in again, it says that it's a duplicate location (http://subclipse.tigris.org/update_1.8.x). So I tried to search for the plug-in in the installed list (help -> about eclipse platform -> installation details), but I can't find Subclipse anywhere.
I have tried uninstalling Eclipse completely. Didn't solve the problem. I'd like to not have to completely reinstall Ubuntu in this VM. Is there any way I can completely clear any and all configurations so I can start from square one?

The following solution assumes you installed with the installer (as opposed to your package manager).
There is a hidden file in your home user directory (the path is /home/user). You can use the shortcut Ctrl+H to discover it.
And then you would find a folder named .eclipse, just remove this folder, as it includes all the setting you have set before.
Alternatively, you can open a terminal, and use the following command:
rm -r ~/.eclipse
Ubuntu, and all Unix systems are similar. They are all Inheritance systems, which will keep the user's setting in home.

The 2 most popular ways of removing eclipse are to either
go into the 'software center', search for eclipse, and then
remove it, or
remove it from a terminal. For example: $sudo apt-get autoremove --purge eclipse
1 seems to be the better way, as 2 leaves pieces behind. In either case, do the following after you remove it:
$whereis eclipse
and if there are any pieces left behind, remove them.
You also should have a .eclipse directory in your home directory. Neither 1 nor 2 will wipe those out. So:
home/yours$rm -r .eclipse
OK, so now to reinstall it, you could use apt-get, or software center, or download the compressed archive file from http://www.eclipse.org/downloads/ I prefer to download the latest version. I also prefer eclipse 'classic', and then I can add the features I need to it. So after downloading:
$sudo tar xvf eclipse-SDK-4.2.1-linux-gtk-x86_64.tar.gz -C /opt
To run:
$/opt/eclipse/.eclipse
There are then a few different options for creating a shortcut.
Here's a quick run down of one that should only take a few seconds (you may not need sudo and chmod):
$sudo touch /usr/share/applications/eclipse.desktop
$sudo chmod 777 /usr/share/applications/eclipse.desktop
$vim /usr/share/applications/eclipse.desktop
and paste:
[Desktop Entry]
Name=Eclipse
Type=Application
Exec=/opt/eclipse/eclipse
Terminal=false
Icon=/opt/eclipse/icon.xpm
Comment=Integrated Development Environment
NoDisplay=false
Categories=Development;IDE
Name[en]=eclipse.desktop
and then run:
$cd /usr/local/bin
$sudo ln -s /opt/eclipse/eclipse
$eclipse
Then you can just right click on the launcher icon (in Ubuntu 12.04 at least) and lock it to the launcher.

For others having this problem (as I just was):
Click "Available Software Sites" link under the "Add..." button
Highlight the listing that is causing you the problem and click "Remove"
Click "OK"
Click "Add..." again and enter the URL once again
By 'this problem' I mean receiving the "Duplicate Location" error that won't let you click "OK "when you add the URL of Subclipse into the Location field after clicking "Add...".

Start by finding any left-behind eclipse configuration:
#sudo updatedb
#locate eclipse
This may find some things left behind you were unaware of.

If Eclipse was installed using snap:snap remove eclipse

The "duplicate location" is unrelated to an actual previous install of Subclipse; it just means you tried to define the update site a second time. Having defined it once, you don't need to do it again, and you'd simply skip that step on subsequent attempts. Reinstall Eclipse, and then just don't try to redefine the repository location more than once.
And make a nice cup of tea and relax.

Try the following command as root user
sudo rm -r ~/.eclipse

In the case where you install eclipse using snap, then the command below should do it.
sudo snap remove eclipse

Related

Adding Eclipse to Gnome Do

I'm trying to make do without a start menu on my Lubuntu laptop, and have installed Gnome Do as my launcher of choice.
Everything has been working the way it should up to now, and I have to say that the launcher really does eliminate the need for a start menu.
Anyway, I recently installed Eclipse (the java ide) and I can't get it to show up in Gnome Do. Here's how I installed eclipse:
$ ...Download eclipse, obviously...
$ cd /opt
$ sudo tar xvfz ~/Downloads/eclipse-whatever.tar.gz
Then I created a launcher for use on the Lubuntu desktop:
$ lxshortcut -o ~/Desktop/eclipse
After some fiddling around I ended up with this file in my ~/Desktop folder:
eclipse.desktop:
[Desktop Entry]
Type=Application
Exec=/opt/eclipse/eclipse
GenericName=Eclipse Java IDE
Icon=/opt/eclipse/icon.xpm
Name[en_US]=Eclipse Java IDE
StartupNotify=true
Categories=Development
The icon shows up nicely on the Lubuntu desktop. I can click it, and eclipse launches as expected.
However, no matter what amount of tweaking and restarting of Gnome Do, I just can't get it to show Eclipse.
Strange thing is I have Firefox on the desktop, with pretty much the same contents in the desktop shortcut file, and this shows up just fine.
What am I doing wrong here?
I never found out why this doesn't work, but searching around on google I found that many people were using a tool called alacarte to setup new menu items. So I threw away the eclipse.desktop file I had created and used alacarte to set up the launcher, and after having done that the problem was solved. I can now search for eclipse with Gnome Do.

dart-eclipse plugin crashing after installing dart plugin

I am using a new installation of Eclipse Luna SR2. I install the dart-eclipes update from the site https://storage.googleapis.com/dart-archive/channels/dev/release/latest/editor-eclipse-update/. The version 1.10.0-dev.1.9 (rev 45311) installed. However, after restarting eclipse after the installation prompt to restart, the Luna logo is visible for a short while and then crashes (is no longer visible). There is no console output or anything.
Old eclipse metadata have been removed from the installation folder.
Thanks for any help
The dart plugin checks for a 'dart-sdk' directory in your eclipse installation directory.
If you have dart and eclipse unzipped in your home ~/bin, then this should do the trick:
$ cd ~/bin/eclipse
$ ln -s ../dart/dart-sdk/
Now you should be able to start ./eclipse.
Update:
I have submitted this issue to the dart bug tracker:
https://code.google.com/p/dart/issues/detail?id=23335
Warning: the suggested symbolic link workaround will erase the target dart-sdk directory when doing an upgrade from inside Eclipse. If you don't want this to happen just copy the whole directory instead of linking.
Go to the dart directory you dowloaded.
Copy the dart-sdk directory.
Paste it directly in your eclipse directory. (the directory
containing eclipse.exe)
Bonus :
To get the error messages when Eclipse crashes you can find the log in the directory you specify when you try to launch Eclipse.
--> "MyJavaProjects"\.metadata\.log.txt

Using an Eclipse plugin without root access

I have exhausted just about every link I could find on this topic --- my Google searches are pure purple links now. It's possible I overlooked something, but anyway...
A user, who does not have root access, would like to use PyDev for Eclipse. We are using Eclipse 3.6.1, Linux x86_64. I have identified that the highest working version of PyDev that we can use is 2.8.0 (did this by using root access to discover that versions higher than that won't install).
All guides point to being able to use the .eclipse folder in the user's home directory, but no matter what I put in there, what combination of subfolders, etc., Eclipse absolutely will not detect PyDev.
Let me break down my process for testing this, one step at a time:
cd .eclipse/org.eclipse.platform_3.6.1_793567567/
mkdir dropins
mkdir dropins/PyDev-2.8.0
cd dropins/PyDev-2.8.0
wget <2.8.0 zip file>
unzip PyDev\ 2.8.0.zip
This results in...
~/
.eclipse/
artifacts.xml
configuration/
dropins/
PyDev-2.8.0/
features/
plugins/
p2/
Like I said, I've re-arranged this in multiple combinations such that "features" and "plugins" are one directory higher, two directories higher, etc. No combination will seem to do the trick.
When I execute eclipse, I'm using:
eclipse -clean -console -consoleLog
There's never any mention anywhere about PyDev's presence even being acknowledged.
A lot of the guides I've found online seem based on Windows. While eclipse.ini does exist for Linux, and while some guides say that file needs to be modified to include the home directory sub-directory, that file is inaccessible to all but root (and therefore cannot be modified).
Is this going to be doable with absolutely zero root intervention?
Why would you even need root access? Just have them download the current version from eclipse.org, unpack it somewhere, run it, and add PyDev.

Eclipse - keeping several installations in sync

Is it possible to have several installations of Eclipse (with required plugins installed) in sync? If so, what would be the preferred approach?
I am looking for a way to keep Eclipse installations (one on desktop - Wind7 64 bit, another on laptop Win7 64 bit) with the required plugins installed, in sync. Ideally, I would like to exclude the runtime generated files from the sync process. I don't have an exhaustive list of files/folders to exclude but that is the next challenge.
I tried putting one install into a local git repo, then pushing this to a remote repo, followed by cloning from the repo onto the other location. I couldn't launch the cloned instance of Eclipse. I get this error :: http://pastebin.com/BpttUgvG
Versions of interest: Helios, Indigo
I have attempted the following without success
Start with eclipse -clean
Add -vm option to eclipse.ini file
Any suggestions would be gratefully welcomed.
** EDIT **
Is it possible to do this without having to purchase additional software?
I use a script to set up my installs the exact same way on multiple computers. Eclipse comes with the p2 director, which can be used from the command line to install and update plugins.
For example, I download and untar my eclipse-SDK-I20110607-0800-linux-gtk-x86_64.tar.gz and then use the director to load my standard set of features:
bash$ eclipse/eclipse \
-application org.eclipse.equinox.p2.director \
-noSplash \
-repository \
http://download.eclipse.org/egit/updates-nightly,\
http://download.eclipse.org/eclipse/updates/3.7,\
http://download.eclipse.org/releases/indigo \
-installIUs \
org.eclipse.egit.feature.group,\
org.eclipse.egit.source.feature.group,\
org.eclipse.jgit.feature.group,\
org.eclipse.jgit.source.feature.group,\
org.eclipse.emf.sdk.feature.group,\
org.eclipse.xtext.sdk.feature.group,\
org.eclipse.releng.tools.feature.group
The director can also be used to update an install, although non-intuitively by uninstall and then re-installing the same feature in the same call.
EDIT:
For a set of IUs you can keep each install up to date using uninstall/re-install in the same director call ... if there's an update available:
bash$ eclipse/eclipse \
-application org.eclipse.equinox.p2.director \
-noSplash \
-repository \
http://download.eclipse.org/eclipse/updates/3.7 \
-uninstallIU org.eclipse.sdk.ide \
-installIU org.eclipse.sdk.ide \
I don't think you can use this approach just yet, as you need to avoid bug 368238
The director won't effect most settings (formatting, keybindings, etc) as they're workspace scoped (INSTANCE) preferences. Some like formatting or code templates can be turned into project scoped preferences, and then saved in the SCM with the rest of the project information. There are hacks as well to copy workspace scoped preferences to every new workspace that you create.
Have you tried Pulse OneInstall Agent? It is meant for this purpose. They claim that using their tool:
you and your team can retain configuration records in code
repositories (such as CVS), easily update tool configurations and have
behind-the-firewall control of your tooling recipes
You can use this simple ant script: https://github.com/shajra/provisioning-java to automate the following:
downloading of eclipse
install plugins from given update sites
copy default settings for eclipse and workspace
So you can maintain a single source for your eclipse configuration and automate the install and configuration process.
You know how I do it ? I drop the eclipse install folder in my Dropbox. Boom - absolutely synced*. That is for the same OS. If you want different OSes might work but haven't tried it. Maybe you could setup junctions/hard links to the plugins, features and configuration folders, drop those in DB and bug(zilla) them if it doesn't work. Jars should be OS agnostic. See here for my efforts to keep workspace settings in sync. See here for the pecularities of comparing eclipse installs with identical plugins
EDIT : you can selective sync out folders in Dropbox - although there is no easy way to automate it, for a couple computers is not a huge pain
* : same goes for the firefox profile and this is OS agnostic. Same for most of my settings. Gosh if they suspend the free accounts I'll have to pay them

How to launch eclipse from a command line on MacOS with a workspace pathname

On linux:
eclipse PathnameToWorkspace
works fine, and launches eclipse on the workspace.
I've never been able to figure out the MacOS moral equivalent, given the MacOS application tree structure.
I suspect this is not a hard problem.
./eclipse -data <workspace-path> (see also How do I run Eclipse in the Eclipse Wiki).
On my system there's a link to the eclipse binary from /Applications/eclipse/eclipse, and I find that just running that will start Eclipse with my default workspace.
You might also find the Eclipse binary in '/Applications/Eclipse.app/Contents/MacOS/eclipse'.
When I start Eclipse like this (from the command line) I find that my Mac will not always switch to the desktop where Eclipse is started, so that I will have to go hunt for the Eclipse window with Exposé/Misson Control (Ctrl-Up Arrow). – This is especially true when I'm have two monitors connected to my Mac.
Since I found typing the full path to eclipse annoying, I simply added a symlink to it from /opt/local/bin and made sure that directory is in my $PATH:
cd /opt/local/bin
sudo ln -s /Applications/eclipse/eclipse .
echo 'PATH="$PATH:/opt/local/bin' >>~/.bashrc
After that, just issuing the command eclipse (without the preceding /Applications/eclipse part) works as it should.
After doing lots of hit and try I have added following into my bash_profile and I am able to launch eclipse from terminal.
(Note: Eclipse is inside Application)
export PATH="$PATH:/Applications/Eclipse.app/Contents/MacOS"
Hope it will be helpful for beginner like me.