The below command is to execute the JAR file from any of the Unix or Linux based server.
/usr/java8/bin/java -jar $JAR_FILE
Sample Shell Script:
#!/bin/ksh
#*******************************************************************************
# Name : HH_TEST_SHELL
# Date : 19-MAY-2023
# By : AskHareesh
# Description : Execute JAR File
#
#*******************************************************************************
JAR_FILE=`echo $1|cut -f9 -d' '|cut -f2 -d'"'`
echo "JAR_FILE: $JAR_FILE"
/usr/java8/bin/java -jar $JAR_FILE
No comments:
Post a Comment