JAVA_HOME not found as Sudo
问题 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: *INFO * Using JVM found at /opt/jdk6/bin/java When I try to use the script with Sudo though, it gives: *ERROR* Unable to locate java, please make sure java is installed and JAVA_HOME set I've set JAVA_HOME to the same path above — can see it with echo $JAVA_HOME & it's also set as an option within the script. I'm happy that the