#!/bin/bash
#install_check
rpm -qa | grep jdk >> result.txt

FILE="result.txt"

if [ -s $FILE ]; then
        echo "you already installed java"
else
        echo "start to install javal"
        yum list java*jdk-devel
        echo -n "Enter wanna install java version: "
        read JAVA_VERSION
        yum install -y $JAVA_VERSION
        javac -version
fi
