I have a bash script on a Linux box that runs a Jar file. When logged in as a regular user I don\'t have permission to run the script, but it prints the following log:
You could always just pass it to java explicitly like this:
sudo java -Djava.home=$JAVA_HOME Test