/ Installation  

A few quick tips to help you install Java

Hi there AppWorks fans,

Welcome to a new installment of AppWorks tips.

This guide will help you to install OpenJDK Java on our RHEL VM image. Easy stuff, but always nice to see how smooth this goes.

This post is part of the series for ‘AppWorks installation in 10 great steps’.

This is the list of ingredients we are going to use:

  • The already installed ‘Oracle Virtual Box’ software from the previous post
  • Our brand-new RHEL VM image from the previous post
  • PuTTY (SSH client). Downloaded from: putty.org

Let get right into it…

First thing to do is open the Oracle VM VirtualBox tooling and start-up our image. Leave the image as is because we can make a connection with PuTTY. Login with the created ‘sysadmin’ user. Password used as an example: ‘admin’.

Once we have a valid connection, we need to install OpenJDK first as it is required to run TomEE. What version to use? This can again be found in the ‘AppWorks Platform Supported Environments’ documentation that can be found on the support site from OpenText.

The documentation tells us to install OpenJDK 17 (>= 17.0.8)

general_001

So, from your terminal screen give the command: sudo yum -y install java-17-openjdk-devel

When done you should have java available by the command: java -version

You will get this information back:

1
2
3
openjdk version "17.0.13" 2024-10-15 LTS
OpenJDK Runtime Environment (Red_Hat-17.0.13.0.11-1) (build 17.0.13+11-LTS)
OpenJDK 64-Bit Server VM (Red_Hat-17.0.13.0.11-1) (build 17.0.13+11-LTS, mixed mode, sharing)

To make it nicer and smoother we will create a new variable JAVA_HOME (and some others!). So, edit the ~/.bash_profile of the ‘sysadmin’ user: vi ~/.bash_profile

1
2
3
4
5
6
7
8
9
10
11
12
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-17.0.10.0.7-2.el8.x86_64
LIB_PATH=$JAVA_HOME/lib/server
export PATH=$PATH:$HOME/.local/bin:$HOME/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LIB_PATH

Quick vi-reference

  • Hit <Insert> to start making changed
  • Hit <Esc> to stop making changed
  • To save the file (after <Esc>) type: :w
  • To quit the file (after <Esc>) type: :q

When done reload your profile via the command: source ~/.bash_profile

Check if it’s all OK via: env | grep java


That’s again a knuckle-bump ‘DONE’. Good job for this post! The next step in the series for ‘AppWorks installation in 10 great steps’ we’ll install the TomEE application server. Have a good one for now, and I’ll see you in the next post.