This time our focus is to install the latest OpenJDK in a Windows system. Let’s start with the download first.

Current OpenJDK GA release can be found here: https://jdk.java.net/16/ the latest version now is JDK 16.0.1 Now let’s download the latest version that is provided as a .zip archive for Windows / x64.

Here’s a direct download link: https://download.java.net/java/GA/jdk16.0.1/7147401fd7354114ac51ef3e1328291f/9/GPL/openjdk-16.0.1_windows-x64_bin.zip

Now we’ll need to unzip the file into a target folder. I prefer to put Java into a folder like C:\Program Files\Java but theoretically it can be located anywhere on your drive. Be sure to use Admin user (or have an access to the Admin user credentials) to extract zip archive into C:\Program Files folder.

My unzipped folder looks like this:

Our next task is to add our Java to the Windows PATH variable so we can execute it across all of our System.

Press Win key and start typing: “Environment Variables” you should see something like this:

Open Edit the environment variables link and in the Advanced Tab select Environment Variables

Now in the .Environment Variables select Path from a list of System Variables and click Edit…

Add your folder path with Java installation to the list, be sure to use path with \bin folder in the end. In this example I have it like so:

C:\Program Files\Java\jdk-16.0.1\bin

We should have something like this eventually:

Now close all the windows and let’s verify if we have added Java to the PATH variable correctly, start the Command Prompt and just type:

echo %PATH%

Our output should have our Java installation location included, and may look like this:

We are done with this part, now we can verify that our Java installation is working properly, while in the command prompt type and execute:

C:\>java -version & javac -version

Our output is expected to be something like:

openjdk version "16.0.1" 2021-04-20
OpenJDK Runtime Environment (build 16.0.1+9-24)
OpenJDK 64-Bit Server VM (build 16.0.1+9-24, mixed mode, sharing)
javac 16.0.1

Was it simple? I think it was! Good job!

So, you are puzzled how to install JDK from tar.gz file in your Ubuntu system? In reality it’s pretty simple. Let’s start with the download first.

Open: https://jdk.java.net/16/ the latest version now is JDK 16.0.1 be careful and select proper architecture for your machine. For general x64 linux machines it’s named Linux / x64. Or you can just get it from the terminal like this:

user@ubuntu:~$ cd ~/Downloads
user@ubuntu:~$ wget https://download.java.net/java/GA/jdk16.0.1/7147401fd7354114ac51ef3e1328291f/9/GPL/openjdk-16.0.1_linux-x64_bin.tar.gz

Now you have your openjdk-16.0.1_linux-x64_bin.tar.gz in the Downloads folder the next step is to extract it to the /opt folder like so:

user@ubuntu:~$ sudo tar xvf ~/Downloads/openjdk-16.0.1_linux-x64_bin.tar.gz -C /opt

and let’s verify that we have all the files we are expecting in the /opt folder:

user@ubuntu:~$ ls -la /opt 

We should see something like:

So we are all good and now we can continue with the installation, let’s run:

user@ubuntu:~$ sudo update-alternatives --install /usr/bin/java java /opt/jdk-16.0.1/bin/java 1000

and the same idea for Java Compiler:

user@ubuntu:~$ sudo update-alternatives --install /usr/bin/javac javac /opt/jdk-16.0.1/bin/javac 1000

Now we have our JDK installed it’s time to make sure we are using the correct version. If you don’t have any other versions of Java installed you can safely skip this part. Otherwise let’s update the default JDK that our system will be using.

user@ubuntu:~$ sudo update-alternatives --config java

Possible output may look like this:

There are 2 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                      Priority   Status
------------------------------------------------------------
* 0            /opt/jdk-17/bin/java       1001      auto mode
  1            /opt/jdk-16.0.1/bin/java   1000      manual mode
  2            /opt/jdk-17/bin/java       1001      manual mode

Press <enter> to keep the current choice[*], or type selection number: 

Now we need to select the version we are planning to use – in my case I’ll need to input 1 and press Enter. And let’s just run this command one more time to see if we have changed the default JDK:

user@ubuntu:~$ sudo update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                      Priority   Status
------------------------------------------------------------
  0            /opt/jdk-17/bin/java       1001      auto mode
* 1            /opt/jdk-16.0.1/bin/java   1000      manual mode
  2            /opt/jdk-17/bin/java       1001      manual mode

Press <enter> to keep the current choice[*], or type selection number: 

Now repeat the drill for Java compiler:

user@ubuntu:~$ sudo update-alternatives --config javac

Select the version we have just installed:

There are 2 choices for the alternative javac (providing /usr/bin/javac).

  Selection    Path                       Priority   Status
------------------------------------------------------------
* 0            /opt/jdk-17/bin/javac       1001      auto mode
  1            /opt/jdk-16.0.1/bin/javac   1000      manual mode
  2            /opt/jdk-17/bin/javac       1001      manual mode

Press <enter> to keep the current choice[*], or type selection number:

And verify the result by running the same command:

user@ubuntu:~$ sudo update-alternatives --config javac
There are 2 choices for the alternative javac (providing /usr/bin/javac).

  Selection    Path                       Priority   Status
------------------------------------------------------------
  0            /opt/jdk-17/bin/javac       1001      auto mode
* 1            /opt/jdk-16.0.1/bin/javac   1000      manual mode
  2            /opt/jdk-17/bin/javac       1001      manual mode

Press <enter> to keep the current choice[*], or type selection number: 

Alright! We are all good! Now it’s the time to verify that we are all good and our version is the one we expected:

user@ubuntu:~$ java -version && javac -version

Our output is expected to be something like:

openjdk version "16.0.1" 2021-04-20
OpenJDK Runtime Environment (build 16.0.1+9-24)
OpenJDK 64-Bit Server VM (build 16.0.1+9-24, mixed mode, sharing)
javac 16.0.1

Purrrfect! This is what we were looking for! Good job!

It’s been ~1.5 years since I decided to choose Java as my main programming language. I spent some long time considering what to choose… another candidate was Python… a much lighter and a whole different animal. Given what’s going on with TIOBE index nowadays I had some time to question my decision… Python is really in demand and Java is dropping. But there was something magical in Java, may be that it didn’t look as light and the challenge that it was putting in front of me? Definitely I started and dropped learning Java 2 or 3 times before. 🙂 So back to the point I’m on my journey to Oracle Certified Java Programmer achievement. The surprise from Oracle was that they decided to retire 1Z0-815 and 1Z0-816 exam and created an new one – 1Z0-819 that combined both… so basically they put me away from my goal to take 1Z0-815 in 2020. Because the knowledge of 1Z0-815 isn’t enough for 1Z0-819 I’m kindof stuck with learning the 1Z0-816 part now to have a complete knowledge for the new exam. But I needed something so I went and got certified as Java Certified Foundations Associate at least something to keep me going.

I must say that the body of knowledge for 1Z0-819 is huge… pretty much ~1500 pages which one needs to not only make sense of but be able to answer really tricky questions about. So on my way I have changed a lot of different approaches to learning that much. So I want to share my latest idea here and look at it later and revisit it and may be add something for the future me or a reader 🙂

1st go:

  • Divide the material into sections – e.g. 1 section contains 2-3 chapters. Smaller sections are good too.
  • Read through the section without digging too deep, try to make sense of material but don’t cram it.

2nd go:

  • Work on each chapter from the section:
    • Write a compendium in own words. This helps a lot! Checks the understanding on the fly.
    • Experiment with material, examples are good but experimentation is much better.
    • Get Additional info from other sources to get unstuck if there’s a wall. Yep, that’s Ok. I’ve hit many of those.
    • Try to explain the material to somebody else. Like your own kid. Kudos to Feynman learning technique.

3d go:

  • Apply the knowledge:
    • Practice coding! What can be better than that? Do what you have learnt, apply it.
    • Practice katas, those are nice to. codewars.com is a good place to do that.
    • Practice by building something that would use the material

4th go:

  • Return to the previous section later and review the compendium.

Repeat all of that for the next section of chapters.

Good luck and happy learning! Make that happen!

Are you guys looking for cheap developers? 🙂 Prepare to ask yourself many uncomfortable questions 🙂

This trend is really interesting these days, I’ve been bombarded by recruiters looking for SDET position candidates on a daily basis. I know, recruiters aren’t those who write job requirements. So this post would be more addressed to Hiring Managers. So who do you guys really want? Let’s look at skillsets(obv. incomplete, just for the sake of visualization):

  • Software Tester(QA Engineer):
    • Testing approach: Black Box, White Box, Grey Box.
    • Understanding of SDLC
    • Different types of testing: Functional, UX/UI, etc.
    • Test tracking and management tools.
    • Automation tools for testing. (This one deserves a separate list I think)
    • Programming basics.
    • Critical Thinking, Communication skills.
  • DevOps:
    • Infrastructure as code
    • CI/CD
    • Test automation
    • Containerization
    • Orchestration
    • Software deployment
    • Software measurement
  • Developer
    • String knowledge in programming language or multiple (OOP, Frameworks, etc.)
    • Version control
    • Understanding of SDLC
    • CI/CD
    • Software Algorithms, Design, Architecture
    • Databases
    • Unit/Integration testing
  • SDET:
    • Everything from Software Tester (QA Engineer)
    • Everything from DevOps
    • Everything from Developer

Just think about this for a second. Let it sink down.

What is very interesting is that most of SDET job descriptions represent a developer background. Not just any, a strong developer background with 3-5 years of experience.

Let’s look at simple life scenario of SDET at work:

– Hey, {Name} can you test this?
– Sure, here’s a bug.
– Can you look in the code and make sense what’s wrong?
– Sure, here’s the problem in the code.
– Can you fix that yourself?
– Yes, I can fix that and I’ll test the fix after.

Ask yourself these questions now:

  • How is that an SDET and not a Developer?
  • Should your developers stop testing their code? Because that what’s going to happen.
  • What’s going to happen with the software quality when approach like that is used?

Here are some more questions to think about:

  • Why would a developer cut like 15 – 20% of their pay to become an SDET and focus on testing?
  • What kind of developer would be the one who wants that? Why do you think they will be better at testing?
  • How is it possible to be good at all of these areas at the same time given current software complexity?
  • Why do you think there’s such a demand for SDETs in the market?

Who can actually make a good SDET?

  • College grads / Junior developers. They still have a lot to learn. Good start for them to decide which way to go. QA, DevOps or Dev.
  • Testers who want more in their career. Who can and want to automate more or become developers.

So these are those who are you looking for to fill your SDET positions. Plain and simple.

Same article on LinkedIn

This article will open a series of manuals on how to setup an automation testing environment using the latest at the moment Ubuntu 20.04 Linux, Current JDK 11 LTS, Latest Maven, Latest JUnit and IntelliJ Community IDE.

Preconditions: This article assumes that you have Ubuntu 20.04 installed and updated with all the latest updates. You also should have sudo privileges to be able to install the software.

Part 1 – Install JDK:

The simplistic way: Open JDK is available to install using apt, open your terminal and execute:

user@ubuntu:~$ sudo apt install default-jdk

Follow the installation procedure. It’s straightforward and usually doesn’t have any issues along the way. Post install verification can be found right after alternative installation methods below, because it’s pretty much the same for all of them. Click to here to get to that part.

Alternative Installation 1: Download from Oracle and install the package manually.

DL link: https://www.oracle.com/java/technologies/javase-jdk11-downloads.html

Take: jdk-11.0.7_linux-x64_bin.deb

Sign In to Oracle and Download will start automatically.

As a result you should get a package: jdk-11.0.7_linux-x64_bin.deb

Now let’s open terminal and execute this command:

user@ubuntu:~$ cd ~/Downloads   //  .deb file should be there

user@ubuntu:~$ sudo apt install ./jdk-11.0.7_linux-x64_bin.deb

This should install the package in your system. Now we’ll need to make java and javac available to the system. For that we need to execute 2 commands:

user@ubuntu:~$ sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk-11.0.7/bin/java 1

And:

user@ubuntu:~$ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk-11.0.7/bin/javac 1

After that continue with Post install verification – click to here to get to that part.

Alternative Installation 2: Amazon Corretto

Downloads for Amazon Corretto are available here: https://docs.aws.amazon.com/corretto/latest/corretto-11-ug/downloads-list.html

Direct link to Java 11 JDK: https://corretto.aws/downloads/latest/amazon-corretto-11-x64-linux-jdk.deb

This should download Java 11 JDK package: java-11-amazon-corretto-jdk_11.0.7.10-1_amd64.deb

The installation is easier than Oracle JDK, let’s do it, open the terminal and type:

user@ubuntu:~$ cd ~/Downloads // .deb file should be there

user@ubuntu:~$ sudo apt install ./java-11-amazon-corretto-jdk_11.0.7.10-1_amd64.deb

This should install the Amazon Correto JDK in your system. Continue with Post installation verification below:

Post installation verification

Now after JDK installation is completed we need to verify that everything works:

user@ubuntu:~$ java -version

The result should look something like:

openjdk version "11.0.7" 2020-04-14
OpenJDK Runtime Environment (build 11.0.7+10-post-Ubuntu-3ubuntu1)
OpenJDK 64-Bit Server VM (build 11.0.7+10-post-Ubuntu-3ubuntu1, mixed mode, sharing)

And to see what do we have for the compiler execute:

user@ubuntu:~$ javac -version

Expected result:

javac 11.0.7

Setting up $JAVA_HOME

This part is following the Open-JDK installation. Make sure you pay attention to your paths for Alternative installations.
Now we’ll need to verify that $JAVA_HOME variable exist. Many parts of this setup depend on this variable. If this is your first install for JDK it most likely isn’t there. So we’ll need to setup the variable like so:

Short way:

This way should work, but if it doesn’t there is an alternative below. In your terminal type:

user@ubuntu:~$ readlink -f $(which java)

The expected result should look like this below. That’s a full Java path in your system:

/usr/lib/jvm/java-11-openjdk-amd64/bin/java

For our $JAVA_HOME we’ll need this part of the path:

/usr/lib/jvm/java-11-openjdk-amd64

If that somehow didn’t work, there’s an alternative. See below.

Long way:

Type this in the terminal:

user@ubuntu:~$ whereis java

The reply should look like this:

java: /usr/bin/java /usr/share/java /usr/share/man/man1/java.1.gz

Now, let’s start digging, type this:

user@ubuntu:~$ ls -l /usr/bin/java

Oh, that’s a symbolic link… let’s dig deeper:

user@ubuntu:~$ ls -l /etc/alternatives/java

Reply should be looking like so:

lrwxrwxrwx 1 root root 43 Apr 24 05:02 /etc/alternatives/java -> /usr/lib/jvm/java-11-openjdk-amd64/bin/java

For our $JAVA_HOME we’ll need this part of the path:

/usr/lib/jvm/java-11-openjdk-amd64

Now let’s setup the $JAVA_HOME environment variable with the path we located.

user@ubuntu:~$ export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64

Then verify it’s there:

user@ubuntu:~$ echo $JAVA_HOME

Returns:
/usr/lib/jvm/java-11-openjdk-amd64

And this is the result we are looking for!

Adding $JAVA_HOME to $PATH.

To add $JAVA_HOME to the $PATH we need to type this in the terminal:

/home/user$ export PATH=$PATH:$JAVA_HOME/bin

Those variables will last until bash is running, if you close terminal or restart your computer they’re going to be lost. So, we need to make those changes permanent, we need to open current user’s home folder:

user@ubuntu:~$ cd ~

Then open nano editor(I prefer nano because it’s easy to use) and edit the file .bashrc which is hidden file in current user’s folder.

user@ubuntu:~$ nano .bashrc

And under comments starting with # we need to add these line:

export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64

Now after machine restarts we should be able to see $JAVA_HOME every time we try to access it.

user@ubuntu:~$ echo $JAVA_HOME

Replies with:
/usr/lib/jvm/java-11-openjdk-amd64

We are done with JDK setup! Congrats!