add java environment variable code example

Example 1: set java home path

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

# Add JAVA bin directory to the PATH variable
export PATH=$PATH:$JAVA_HOME/bin

Example 2: bash set environment variable

# Linux - Bash

# syntax 
# export *<variable-name>=*<variable-value>;

# example 
export ORACLE_SID='sales_database';

Example 3: linux set environment variable

# Linux - Bash 

# syntax 
# export *<variable-name>=*<variable-value>;

# example 
export ORACLE_SID='sales_database';

Tags:

Misc Example