Une erreur s'est produite.

L'erreur a été envoyée par e-mail à l'administrateur pour analyse.

How do I install development tools to develop my website?

How to install Eclipse IDE the open source way.

Hello, my name is Christopher Tate. I am a Red Hat consultant and I love open source software. To show how important Eclipse is to the world of open source development, many leading technology companies have their own IDEs based off Eclipse. These include Red Hat, IBM, Texas Instruments, Adobe, Node, PHP and many more. Red Hat® Developer Studio is a certified Eclipse-based integrated development environment (IDE) for developing, testing, and deploying rich web apps, mobile web apps, transactional enterprise apps, and microservices. True to the Red Hat's mission, "to be the catalyst in communities of customers, contributors, and partners creating better technology the open source way," Red Hat is very involved in Eclipse. I will help you install the most recent version of Eclipse to develop your website the open source way.

How do I install the dependencies for Eclipse?

Build the dependencies with yum.

  1. sudo: The command to install yum repositories begins with the command sudo. The "sudo" command allows your current user to have root privileges for a few minutes after entering your password.
  2. Which stands for "Yellowdog Updater Modified", but nobody knows it as yellowdog, just yum. CentOS manages software packages and RPM application files with yum.
  3. -y: Suppress messages asking to confirm if you want to install the software.
  4. git: The package names you wish to install.
sudo yum install -y git
  1. sudo
  2. yum
  3. install: For installing new yum packages.
  4. -y
  5. git: The distributed revision control system for most open source software.

Where do I put the Eclipse source code?

Create a eclipse directory in /usr/local/src.

sudo install -d -o $USER -g $USER /usr/local/src/eclipse
  1. sudo
  2. install: Creates directories and sets attributes on the new directory.
  3. -d: Create directories.
  4. -o: Set ownership on the directory (super-user only).
  5. $USER: The current user to make the owner of the directory.
  6. -g: Set group ownership on the directory (super-user only).
  7. $USER: The current user to make the group owner of the directory.
  8. /usr/local is a place for extra software that you install without the package manager. /usr/local/src is a good place to clone your open source software repositories.

Where do I install Eclipse?

Create a eclipse directory in /opt.

sudo install -d -o $USER -g $USER /opt/eclipse
  1. sudo
  2. install
  3. -d
  4. -o
  5. $USER
  6. -g
  7. $USER
  8. /opt is a good place to install open source software applications like Eclipse.

How do I download the eclipse source code?

Clone the source code with the git command.

git clone git://git.eclipse.org/gitroot/platform/eclipse.platform.releng.aggregator.git /usr/local/src/eclipse
  1. git: The distributed revision control system for most open source software.
  2. clone: Clone a repository into a directory.
  3. git://git.eclipse.org/gitroot/platform/eclipse.platform.releng.aggregator.git: The git URL to the eclipse source code repository.
  4. /usr/local/src/eclipse: The directory where the eclipse source code will be cloned.

How do I pick a recent version of Eclipse?

List all the tags in the git repository.

(cd /usr/local/src/eclipse && git tag)
  1. (cd: Change directory temporarily, because of the open parenthesis.
  2. /usr/local/src/eclipse: The directory where the eclipse source code was cloned.
  3. &&: Run the cd and git command together.
  4. git
  5. tag): Lists the current tags or assigned versions of the code and close the parenthesis.

Picking a version can be quite confusing, so I recommend visiting the Eclipse Project Build Types page. https://download.eclipse.org/eclipse/downloads/build_types.html. You can read about Stable builds: "Stable builds are integration builds that have been found to be stable enough for most people to use. They are promoted from integration build to stable build by the architecture team after they have been used for a few days and deemed reasonably stable. The latest stable build is the right build for people who want to stay up to date with what is going on in the latest development stream, and don't mind putting up with a few problems n in order to get the latest greatest features and bug fixes. The latest stable build is the one the development team likes people to be using, because of the valuable and timely feedback."

Now visit the Eclipse Project Downloads page. https://download.eclipse.org/eclipse/downloads/. Look for the "Stable Builds" section. If it says something like "4.12M1", then look for the git branch "S4_12_0_M1" which would likely be the right stable tag to build off of at that time.

How do I switch versions of the eclipse source code?

Checkout the git tag.

(cd /usr/local/src/eclipse && git checkout S4_12_0_M1)
  1. (cd
  2. /usr/local/src/eclipse
  3. &&
  4. git
  5. checkout: Checkout a branch to the working tree.
  6. S4_12_0_M1): The latest tag to base the branch from.

How do I pull in all the Eclipse dependencies?

Update the submodules with git.

(cd /usr/local/src/eclipse && git submodule update --init --recursive)
  1. (cd
  2. /usr/local/src/eclipse
  3. &&
  4. git
  5. submodule: Git submodules are other git repositories that can be loaded into another repository at a certain commit.
  6. update: Update all submodules in the current git repository.
  7. --init: Initialize empty submodules.
  8. --recursive): Initialize submodules of the submodules in the git repository recursively. This will take a long time.

How do I build the eclipse source code?

Build Eclipse with the mvn command.

(cd /usr/local/src/eclipse && mvn clean verify -DskipTests=true)
  1. (cd
  2. /usr/local/src/eclipse
  3. &&
  4. mvn: The java software project management tool.
  5. clean: Clean up any previous builds.
  6. verify: The Maven target to build the eclipse application.
  7. -DskipTests=true): Skip tests to make the build go faster, but the build will still take a very long time.

Now copy the newly built eclipse application into the destination directory.

What if my build fails?

Try a different tag, clean it up, and try again.

(cd /usr/local/src/eclipse && git tag)
(cd /usr/local/src/eclipse && git checkout S4_12_0_M1)
(cd /usr/local/src/eclipse && git submodule foreach --recursive git clean -f -d)
  1. (cd
  2. /usr/local/src/eclipse
  3. &&
  4. git
  5. submodule
  6. foreach: Perform the following command for each submodule.
  7. --recursive
  8. git
  9. clean: Remove untracked files from the working tree.
  10. -f: Force git to clean the project.
  11. -d): Remove untracked directories in addition to untracked files.
(cd /usr/local/src/eclipse && mvn clean verify -DskipTests=true)

How would I copy the new eclipse build into the right location?

Use rsync.

rsync -r /usr/local/src/eclipse/eclipse.platform.releng.tychoeclipsebuilder/sdk/target/products/org.eclipse.sdk.ide/linux/gtk/x86_64/eclipse/ /opt/eclipse/
  1. rsync: a fast, versatile, remote (and local) file-copying tool.
  2. -r: Recurse into directories.
  3. The directory where the eclipse application was built. Don't forget the ending slash or rsync assumes it's a file inside the destination.
  4. /opt/eclipse/: The directory where the eclipse will be installed. /opt/eclipse/: It's best to always write directories with a trailing slash in rsync for fewer surprises.

How do I make an application icon to run eclipse?

Create an eclipse.desktop file in /usr/share/applications.

echo '[Desktop Entry]
Type=Application

Name=Eclipse

Comment=Eclipse Integrated Development Environment

Icon=/opt/eclipse/icon.xpm

Exec=/opt/eclipse/eclipse

Terminal=false

Categories=Development;IDE;Java;

'
| sudo tee /usr/share/applications/eclipse.desktop

Like that, you can now find Eclipse in your applications!

To review:

Thursday
May 9 2019 How do I install the latest version of eclipse. Install eclipse from the source code. By Christopher Tate
Questions Answers
How do I install the dependencies for Eclipse? Build the dependencies with yum.
Where do I put the Eclipse source code? Create a eclipse directory in /usr/local/src.
Where do I install Eclipse? Create a eclipse directory in /opt.
How do I download the eclipse source code? Clone the source code with the git command.
How do I pick a recent version of Eclipse? List all the tags in the git repository.
How do I switch versions of the eclipse source code? Checkout the git tag.
How do I pull in all the Eclipse dependencies? Update the submodules with git.
How do I build the eclipse source code? Build Eclipse with the mvn command.
What if my build fails? Try a different tag, clean it up, and try again.
How would I copy the new eclipse build into the right location? Use rsync.
How do I make an application icon to run eclipse? Create an eclipse.desktop file in /usr/share/applications.

Previous and next articles.

Don't give up on your dreams. You can do hard things!

Share this story.

Let's get connected.
Up to the top.