Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to move Eclipse.app under /Applications on MacOS?

I used the fancy new installer to install Eclipse Mars on my OS X box and since it was asking for a folder and had a lot of fiddly config details to set, I wasn't sure what it was going to do to my system so I created a new folder ~/Applications/Eclipse/ to put it in.

Fortunately it created an app package, Eclipse.app, so I wanted to move it into /Applications (out of my account folder into the common apps for all users of the box). So I dragged it (it's what you're supposed to be able to do, y'know).

DOH! That did not work. It crashes and crashes and crashes. Moving it back makes it happy again.

What would I need to do to move Eclipse.app, other than delete and reinstall and then reinstall all the plugins and SDKs I added?

like image 253
user1944491 Avatar asked Jan 25 '16 22:01

user1944491


People also ask

Can you use eclipse on Mac?

The Eclipse Installer 2022‑06 R now includes a JRE for macOS, Windows and Linux.


2 Answers

The likely problem here is that Eclipse anticipates the directory structure around it, and fails when the actual directory structure doesn't match its expectations. The simplest solution is to create an alias (like a PC shortcut) in the Applications folder that links back to the application in the folder where it is installed by default.

To do this on a Mac, right click the application, which should be in the user root like so:

~/eclipse/java-mars/Eclipse.app

You should see the dropdown below. Click the "Make Alias" option to create an alias for Eclipse in the same folder. Then just rename this alias "Eclipse," and drag and drop it in Applications, where it should work just fine. Dropdown

like image 174
TheEnvironmentalist Avatar answered Nov 15 '22 06:11

TheEnvironmentalist


Looks like the installer puts a lot of files, including the actual plugins, into folders under the .p2 folder in your home directory. This is true no matter where you install eclipse, with the installer. So either other users would need at least read access to some locations in your account, or you moved your .p2 folder to a central location and changed the eclipse.ini file (embedded in a folder under the eclipse.app folder) to point to the correct location. If you leave the .p2 folder in your account, you'd still need to alter the myeclipse.ini file, as it uses relative paths to files.

For your situation, you might be better off using the standard installation method (unzipping the distribution file), moving the installation to /Applications.

like image 41
Tony Weddle Avatar answered Nov 15 '22 06:11

Tony Weddle