- Spring MVC Cookbook
- Alex Bretet
- 883字
- 2021-07-16 13:03:17
Installing Eclipse for JEE Developers and Java SE 8
The following recipe is about downloading and installing the Eclipse IDE for JEE developers and downloading and installing JDK 8 Oracle Hotspot.
Getting ready
This first recipe could appear redundant or unnecessary in regard to your education or experience. However, having a uniform configuration all along this book will provide you with many benefits.
For instance, you will certainly avoid unidentified bugs (integration or development). You will also experience the same interfaces as seen in the presented screenshots. Also, because the third-party products are living, you will not have the surprise of encountering unexpected screens or windows.
How to do it...
The whole first chapter in general requires a step by step cooperation. From the next chapter, we will be using GIT and your active involvement will be lightened.
- Download a distribution of the Eclipse IDE for Java EE developers:
- We will be using an Eclipse Luna distribution in this book. We recommend that you install this version in order to match our guidelines and screenshots completely. Download a Luna distribution for the OS and environment of your choice from https://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/lunasr1.
The product to download is not a compiled installer but a zip archive.
- If you feel confident enough to use another version (more recent) of the Eclipse IDE for Java EE Developers, all of them can be found at https://www.eclipse.org/downloads.
Tip
For upcoming installations, on Windows, a few target locations are suggested to be in the root directory (
C:\
). To avoid permission-related issues, it would be better if your Windows user is configured to be a Local Administrator. If you can't be part of this group, feel free to target installation directories you have write access to.
- Extract the downloaded archive into an
eclipse
directory from the steps:C:\Users\{system.username}\eclipse
: Extract it here if you are on Windows/home/usr/{system.username}/eclipse
: Extract it here if you are on Linux/Users/{system.username}/eclipse
: Extract it here if you are on Mac OS X
- Select and download JDK 8:
- We suggest that you download the Oracle Hotspot JDK. Hotspot is a performant JVM implementation originally built by Sun Microsystems. Now owned by Oracle, the Hotspot JRE and JDK are downloadable for free.
- Then, choose the product corresponding to your machine through the Oracle website's link http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html.
Note
To avoid a compatibility issue later on, do stay consistent with the architecture choice (32 or 64 bits) that you have made earlier for the Eclipse archive.
- Install JDK 8 on the operating system of your choice using the following instructions:
On Windows, this is a monitored installation initiated with an executable file:
- Execute the downloaded file and wait until you reach the next installation step
- On the installation-step window, pay attention to the destination directory and change it to
C:\java\jdk1.8.X_XX
(X_XX
refers to the latest current version here. We will be using jdk1.8.0_25 in this book. Also, it won't be necessary to install an external JRE, so uncheck the public JRE feature.)
On Linux/Mac, perform the following steps:
- Download the
tar.gz
archive corresponding to your environment - Change the current directory to where you want to install Java. For easier instructions, let's agree on the
/usr/java
directory - Move the downloaded
tar.gz
archive to this current directory - Unpack the archive with the following command line targeting the name of your archive:
tar zxvf jdk-8u25-linux-i586.tar.gz
(this example is for a binary archive corresponding to a Linux x86 machine)
You must end up with the /usr/java/jdk1.8.0_25
directory structure that contains the /bin
, /db
, /jre
, /include
subdirectories.
How it works…
In this section we are going to provide more insights about the version of Eclipse we used and about how we chose this specific version of JVM.
Eclipse for Java EE developers
We have successfully installed the Eclipse IDE for Java EE developers here. Comparatively to Eclipse IDE for Java Developers, there are some additional packages coming along such as Java EE Developer Tools, Data Tools Platform, and JavaScript Development Tools. This version is appreciated for its ability to manage development servers as part of the IDE itself, its capability to customize project facets, and its ability to support JPA. The Luna version is officially Java SE 8 compatible; this has been a decisive factor at the time of writing.
Choosing a JVM
The choice of the JVM implementation could be discussed over performance, memory management, garbage collection, and optimization capabilities.
There are lots of different JVM implementations, including couple of open source solutions such as OpenJDK and IcedTea (RedHat). The choice of JVM really depends on the application's requirements. We have chosen Oracle Hotspot from experience and from reference implementations deployed in production; this JVM implementation can be trusted for a wide range of generic purposes. Hotspot also behaves very well if you have to run Java UI applications. Eclipse is one of them.
Java SE 8
If you haven't already played with Scala or Clojure, it is time that you took the functional programming train with Java! With Java SE 8, Lambda expressions reduce the amount of code dramatically providing improved readability and maintainability. We won't implement this Java 8 feature, but since it is probably the most popular, it must be highlighted as it has given a massive credit to the paradigm change. It is important, nowadays, to be familiar with these patterns.
- JavaScript從入門到精通(微視頻精編版)
- Mastering Adobe Captivate 2017(Fourth Edition)
- C語言實驗指導及習題解析
- 自然語言處理Python進階
- Statistical Application Development with R and Python(Second Edition)
- C語言程序設計簡明教程:Qt實戰
- Hands-On Nuxt.js Web Development
- Xamarin Blueprints
- C# 7.0本質論
- Access 2016數據庫應用與開發:實戰從入門到精通(視頻教學版)
- Illustrator CS6中文版應用教程(第二版)
- Python自動化運維:技術與最佳實踐
- 數據庫基礎與應用實驗教程:Visual FoxPro 6.0
- 測試基地實訓指導
- IBM DB2 9.7 Advanced Administration Cookbook