MOBI BOOT CAMP CORP. logoLearning Buddy
  • SIGN IN
  • Introduction
  • Unit 0: The First Program
    • Getting Started
    • The main method
    • How Programs Work
    • More on methods
    • Recap and Key Terms
    • Newbie pitfalls
    • Eclipse
    • Unit 0 Slides
  • Unit 1: Using Objects and Methods
  • Unit 2: Selection and Iteration
  • Unit 3: Class Creation
  • Unit 4: Data Collections

Eclipse Download

You can download open-source eclipse package from here: https://www.eclipse.org/downloads/packages/

When you go to the Eclipse download page, you'll see several options for different operating systems and computer architectures. It's important to choose the right one for your computer to ensure Eclipse runs correctly.

Eclipse Download Options

Here's a breakdown of what the terms mean:

  • Windows, macOS, Linux: These are the major operating systems. You need to select the one that is running on your computer.

  • x86_64: This refers to a 64-bit processor architecture, commonly found in computers with Intel or AMD CPUs. Most modern desktop and laptop computers use this architecture. If you have a standard PC or an older Mac with an Intel chip, this is likely the correct choice for you.

  • AArch64: This stands for ARM 64-bit architecture. This is becoming more common in newer laptops. For example, if you have a newer Mac with an Apple Silicon chip (like the M1, M2, or M3), you should choose the AArch64 version for macOS. Similarly, some Windows laptops run on ARM processors.

  • riscv64: This is a less common 64-bit architecture called RISC-V. It's an open-source architecture and is not typically found in consumer laptops or desktops. You would likely know if you needed this version.

How to choose:

  1. Identify your Operating System: Are you using Windows, macOS, or Linux?
  2. Identify your computer's architecture:
    • On Windows: You can find this in Settings > System > About. Look for "System type". It will likely say "64-bit operating system, x64-based processor" (which means x86_64) or "ARM-based processor" (which means AArch64).
    • On macOS: Click the Apple menu in the top-left corner and select "About This Mac". Look for "Chip". If it says "Apple M1" (or M2, etc.), you have an AArch64 architecture. If it says "Intel", you have an x86_64 architecture.
    • On Linux: You can open a terminal and type uname -m. If it returns x86_64, that's your architecture. If it returns aarch64, you have an ARM-based system.

By matching your OS and architecture, you can download the correct version of Eclipse.

Installation and First Launch

Once you've downloaded the correct package for your system, follow these steps to get Eclipse up and running.

1. Extract the Archive

The downloaded file is usually a compressed archive (like a .zip for Windows or .tar.gz for macOS/Linux). You need to extract its contents.

  • On Windows: Right-click the downloaded .zip file and select "Extract All...". Choose a location to extract the files. A good place is your user's home directory (e.g., C:\Users\YourUsername\eclipse).
  • On macOS: Double-click the downloaded .tar.gz file. The system's Archive Utility will automatically extract it into a new folder in the same location. You can then move this folder to your Applications folder.

2. Launching Eclipse

After extraction, you'll have a folder containing the Eclipse application.

  • On Windows: Open the extracted folder and find eclipse.exe. Double-click it to start the application.
  • On macOS: If you moved the folder to Applications, you can open it from there. Double-click the "Eclipse" application icon.

When you first launch Eclipse, it will ask you to select a directory as a workspace. This is where Eclipse will store your projects and files.

The Classpath
  • The Classpath is a list of locations where the JVM looks for compiled classes and resources. IDEs like Eclipse manage this for you automatically.

Workspace

You can accept the default location or create a new one by entering the path.

3. Pinning for Easy Access

To avoid having to find the Eclipse folder every time, you can pin the application to your taskbar or dock.

  • On Windows (Pin to Taskbar):

    1. Launch Eclipse.
    2. While it's running, its icon will appear on the taskbar at the bottom of your screen.
    3. Right-click the Eclipse icon in the taskbar.
    4. Select "Pin to taskbar".
  • On macOS (Keep in Dock):

    1. Launch Eclipse.
    2. Its icon will appear in the Dock at the bottom of your screen.
    3. Right-click the Eclipse icon in the Dock.
    4. Go to "Options" and select "Keep in Dock".

Now, you can start Eclipse with a single click from your taskbar or Dock.

Creating a New Java Project

To start writing code, you first need to create a project to hold your files.

  1. Go to the menu bar at the top and click File.
  2. From the dropdown menu, select New.
  3. In the side menu, click on Java Project.

Create New Project

This will open a "New Java Project" wizard. Here, you will need to:

  • Give your project a name (e.g., "HelloWorld").
  • Choose the Java Runtime Environment (JRE) to use. You can usually stick with the default.
  • Click "Finish".

Ensure the create module-info.java file is unchecked as shown in the screenshot below

Workspace

Your new project will now appear in the "Package Explorer" on the left side of the Eclipse window.

Eclipse Shortcuts That Every Programmer Should Know

Eclipse is one of the most popular IDE's and even though IntelliJ Idea is picking up steam in recent times, it is still not a bad idea to learn the below given Eclipse shortcuts as even Intellij supports Eclipse shortcuts in their IDE.

Learning these shortcuts is no longer optional but mandatory! These skills help you improve your productivity as a Developer and you should make every effort be more productive!

All Crtl to be replaced with Cmd for MacOS

Short cut Result Description
crtl+shift+f Formats the code Your code will be formatted as per the configured formatter. If nothing is configured, default formatter is used.
crtl+shift+o Removes unwanted imports If your code has import statements which are not used, they are removed
crtl+. Jumps to the first broken code when you want to tackle all the broken code segments, you would use this handy shortcut as it helps you by jumping from one broken to another with every Crtl+.
crtl+1 Quickfix suggestions popup is opened This command would be used typically after the previous one. Once you jump to the broken code segment, use this command to open the quickfix menu.
crtl+shift+r Opens resource search popup This command comes handy when you are searching for a class name but don't know which package it is hidden in. Once the search prompt opens up, key in the first few letters of your classname to get the search results
alt+shift+r Opens rename and refactor prompt First choose the entity to rename or refactor and then use this shortcut to help refactor or rename all the dependencies of this change globally.
crtl+f Opens Find and Replace popup This command helps you find and optionally replace some keyword with another keyword
crtl+shift+g Searches all references of this class/method This command helps you find where all the given class/method/variable is used in the given project.
crtl+right arrow Shifts the cursor to end of the line Useful to move the cursor quickly instead to going letter by letter
crtl+left arrow Shifts the cursor to beginning of the line Useful to move the cursor quickly instead to going letter by letter
crtl+down arrow Shifts the cursor to the of the file Useful to move the cursor quickly instead to going line by line
crtl+up arrow Shifts the cursor to beginning of the file Useful to move the cursor quickly instead to going line by line
crtl+d Delete the line Keep the cursor on the line to be deleted before using this shortcut

Some of the common shortcuts which are pretty universal across all IDE's and programs are

  • crtl+s - saves the file in context
  • crtl+a - selects all the text in a file in context
  • crtl+c - copies the selected text into the clipboard, typically used after using crtl+a
  • crtl+v - pastes the selected text from the clipboard, typically used after using crtl+c
  • crtl+z - undo what ever was just done before this command
  • crtl+shift+z - redo what ever was undone
Privacy Policy | Terms & Conditions