[JAVA] Enable code completion in Eclipse for Mac

** Addendum ** The shortcut key for Spotlight search is "Control + Space" before OS X Yosemite. After OS X El Capitan, it seems that the default has changed to "⌘ + Space".

For Windows

You can use the code completion function with "Ctrl + Space". For example



Just type and type "Ctrl + Space"


   public static void main(String[] args) {

It automatically completes the frequently used main methods like this.

For Mac

When I enter "Control + Space" ...

スクリーンショット 2017-04-12 23.12.52.png

Yes, on macOS (OS X) it's a shortcut key for Spotlight search by default. The OS side has priority over the shortcut setting of Eclipse, and the code is not completed.

Countermeasure 1: Change the setting of the shortcut key of Eclipse

Eclipse can change the shortcut key to any one.


** 1. Select "Eclipse"-> "Preferences" from the menu bar ** ** 2. Select "Content Assist" from "General"-> "Keys" ** (Enter "content" in the search field)


** 3. Enter any shortcut key in the Binding field **

Let's set other than OS standard shortcuts such as "Ctrl + Space".

Countermeasure 2: Change the shortcut key settings on mac (OS X)

You can also change the shortcut key that launches Spotlight.


** 1. Open "System Preferences" from Launchpad or Dock ** ** 2. Enter Spotlight in the "Search" field at the top right and select the suggested "Keyboard Shortcut" **


** 3. Click inside the red frame to the right of "Show Spotlight Search" and set any key ** (* You can also disable it from the check box)

You can now safely use code completion on your Mac.

Recommended Posts

Enable code completion in Eclipse for Mac
Use completion in Eclipse on mac
Eclipse installation and code completion enhancements (Mac for Java development)
Eclipse Pleiades All in One for Mac released
Technology for reading Java source code in Eclipse
[OpenCV3.2.0] Eclipse (Java) settings (for Mac)
[Mac] Install Java in Visual Studio Code
Open multiple workspaces in Eclipse on Mac
[For beginners] How to debug in Eclipse
When you get "Eh?" In Eclipse code completion-If you stumble on substring code completion-
[For beginners] I tried using DBUnit in Eclipse
[For beginners] I tried using JUnit 5 in Eclipse
Prepare for log output using log4j in Eclipse.
MVC in Eclipse.
Make a snippet for Thymeleaf in VS Code
[Mac] Install Java in Visual Studio Code (VS Code)
Enable / disable SNI in Java for each communication
Tips for generating files for eclipse projects in Gradle
Change code completion shortcut from Ctrl + Space in IntelliJ
Enable Docker BuildKit (mac)
To debug in eclipse
Implement CustomView in code
Create a base for your batch processing project in Eclipse.
VS Code FAQ for those who want to escape Eclipse
How to set character code and line feed code in Eclipse
Create QR code for Google Authenticator using ZXing in Java
Enable WebJars for blank projects in TERASOLUNA 5.x (= Spring MVC)