Prepare your computer to write Java EE 8 code

Important note:

The following instructions are for the Technologies of Internet applications course of DIT (ΤΕΔ) for Java EE 8. The instructions could be used by those who will follow either the JSLT/JSP/Servlet/MySQL path or the JSF/JEE/MySQL path (with or without JPA).

For Angular/REST/MySQL or React/REST/MySQL stack more steps are needed.

Summary of what you are going to install:

  1. Oracle Java JDK
  2. Java IDE (preferably Netbeans or IDEA)
  3. MySQL
  4. MySQL workbench
  5. double commander
  6. git (optional, install only if you already know how to use it)
  7. skype (optional)

Although you may use Windows or MAC OS as an operating system for your development computer, as a beginner it is recommended that you use a Linux-based distribution.

If you haven’t installed the OS yet read this article.

Here are the steps:

0) Prepare the operating system itself

If you already have an operating system installed do the necessary upgrades! If it is more than 3 major distributions behind, it is better to uninstall it completely and upgrade to the latest version.

If you don’t have an Operating System install the latest version of Ubuntu or Mint.

In both cases, backup all important files from your computer to external storage.

1) Set a root password that is easy to type and remember

Ok, some people may claim this is risky but remember that we are setting up a development computer for novices and for assisted coding. You shouldn’t have important/sensitive data placed on the computer we are going to use. If you have, you should backup them and if possible remove them from the laptop.

Here is a sample code that will change the root password (you will be prompt for the new one):

sudo passwd root

You will be asked for your password. Type it two times.

2) Install MySQL and MySQL workbench

To install latest MySQL follow the instructions on the link:

3) Install Open Java JDK

You should install the Open JDK 8 for Java EE 8.

Follow the instructions on the link:

4) Install the desired IDE (?)

The recommended IDE for Java is netbeans. Another great option is IntelliJ IDEA. You could use eclipse too, but I don’t think it is a good choice.

At this point we are going to install netbeans since IDEA is not free. However Netbeans has some installation weaknesses these days: During installation you will be asked for the path of the JDK, Unfortunately, occasionally the default path proposed by the installer is invalid. So you will have to manually fix it during installation. Before running the netbeans installer, you need to note down the path of the SDK by running the following command:

$ update-java-alternatives -l

If you are given multiple choices, select the one with Open JDK 8. Now you are ready to download netbeans. However, note that we do NOT want the netbeans version of the repositories since it is too old. We want the version 8.2 one.This is because Java EE 8 requires Java JDK 8 which is compatible with Netbeans 8.2

So you will have to download it manually:

Download Netbeans 8.2 from the official site and store it to ~/Downloads. Now you have to make it executable and execute it:

$ cd ~/Downloads
$ chmod a+x netbeans-....sh
$ ./netbeans-....sh

Once asked, fill in the path of the JDK found via update-java-alternatives.

If you don’t set it up properly you will get an error later on: when creating a new project error “not all requested modules can be enabled” will occur. You can fix this error via the following links:

5) Prepare your taskbar / desktop

Pin the following to your taskbar (or desktop):

  1. a web browser of your choice
  2. the IDE you have installed
  3. optionally a file manager

Unpin any items you don’t need like libreoffice links or amazon related trash. You will work more efficiently if you keep the desktop clean and tidy.

6) Prepare your workspace for the project

Complete the following steps:

  1. create a folder on your desktop and name it “ted”.
  2. copy to that folder the assignment PDF, any slides and additional resources you were given by the instructors.

7) Install optional software

sudo apt install doublecmd-qt
  • Install git (apt link) if the team can use it. If you don’t know how to use git, do not install it:
sudo apt install git

You can optionally install skype if the team can use it.

8) What else?

Check that your Wifi is working !

 

Next step?

Once you have setup the IDE, you could install additional software:

Leave a Reply