|
| 1 | +# How to run a custom Eclipse on macOS |
| 2 | + |
| 3 | +(Apparantly, this was only tested on AMD64-based Macs = Intel Macs only!) |
| 4 | + |
| 5 | + |
| 6 | +## Problem |
| 7 | + |
| 8 | +If you just run a custom Eclipse without further configuration on modern macOS systems, you will propably get one of the following error messages: |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | +## Solution |
| 18 | + |
| 19 | +The following steps are necessary to run a custom Eclipse on modern macOS systems. |
| 20 | + |
| 21 | +- Allow your Terminal the privileges to `Full Disk Access` and `Developer Tools` in the `Settings` app of macOS. |
| 22 | + - `Settings` -> `Privacy & Security` -> `Full Disk Access` -> Add `Terminal` app and/or toggle its setting to `on`. |
| 23 | + - `Settings` -> `Privacy & Security` -> `Developer Tools` -> Add `Terminal` app and/or toggle its setting to `on`. |
| 24 | +- Install the recommend JDK, e.g., [Eclipse Temurin JDK 17](https://adoptium.net/de/temurin/releases/?os=mac&arch=x64&package=jdk&version=17). |
| 25 | +- Download the custom Eclipse archive (e.g., from https://emoflon.org or GitHub). |
| 26 | +- Extract it with a double click. |
| 27 | +- Right click on `Eclipse.app` -> `Show Package Contents` -> Navigate into `Contents`. |
| 28 | +- Open `Info.plist` with a text editor of your choice (e.g., [VSCodium](https://vscodium.com/)). |
| 29 | +- Open a Terminal window and run `$ /usr/libexec/java_home` |
| 30 | + - This should return you a single path to your default Java JDK installation, e.g., `/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home` |
| 31 | +- Leave your Terminal window open and return to your text editor (showing the contents of `Info.plist`). Scroll down into the block below the line `<key>Eclipse</key>` and enter your Java JDK's path with this syntax: `<string>-vm</string><string>$YOUR_PATH/bin/java</string>` |
| 32 | + - Example: `<string>-vm</string><string>/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home/bin/java</string>` |
| 33 | +- Save the file, close your editor, and open your Terminal window again. |
| 34 | +- Navigate the Terminal window to your Eclipse folder using `cd $FOLDER_NAME`, e.g., `cd Downloads/eclipste`. |
| 35 | + - Verify that your custom `Eclipse.app` is located in the currently selected folder via `ls`. |
| 36 | +- Sign the modified `Eclipse.app` with this command: `$ sudo codesign --force --deep --sign - ./Eclipse.app` |
| 37 | + - When requested, type in the password of your user account and hit enter. |
| 38 | +- Run `$ xattr -d com.apple.quarantine ./Eclipse.app` within the Terminal. |
| 39 | +- As for the `Terminal` app, add the privileges for `Full Disk Access` and `Developer Tools` to your `Eclipse.app`. |
| 40 | + |
| 41 | +You can now start your custom `Eclipse.app` with a double click on it. |
| 42 | +If macOS asks if you really want to start the "broken" app, select `Run`. |
| 43 | + |
| 44 | +--- |
| 45 | + |
| 46 | +## Currently known issues |
| 47 | + |
| 48 | +... besides the hustle to get Eclipse running. |
| 49 | + |
| 50 | +- Custom eMoflon settings will not be honored. |
| 51 | + - The default *perspective* is not the *eMoflon perspective*. |
| 52 | + - The default workspace encoding may not be *UTF8*. |
| 53 | + - The default git clone path is not `${workspace_loc}/git` as required to run eMoflon. |
| 54 | +- There is no specific build for ARM64/Apple ARM-based macOS systems. |
| 55 | + |
| 56 | +--- |
| 57 | + |
| 58 | +## References/Pointers to useful websites |
| 59 | + |
| 60 | +- https://stackoverflow.com/questions/70725347/the-application-eclipse-can-t-be-opened-macos-monterey/71740449#71740449 |
| 61 | +- https://www.eclipse.org/forums/index.php/t/1106695/ |
| 62 | +- https://forums.developer.apple.com/forums/thread/684509 |
| 63 | +- https://forums.developer.apple.com/forums/thread/673057 |
| 64 | +- https://stackoverflow.com/questions/44872071/removing-the-code-signature-from-a-mac-app-executable |
0 commit comments