ctSkennerton / minced

Mining CRISPRs in Environmental Datasets
GNU General Public License v3.0
99 stars 17 forks source link

wrapper script not honouring JAVA_HOME #28

Closed tseemann closed 5 years ago

tseemann commented 5 years ago

I know this isn't really your problem, but I think it is important. Turns out if you have an active env in conda, and you run your helper script "minced" it does NOT use conda java! The #/bin/bash causes ~/.bashrc to run and set the env base to base. Which if you use envs for everything, does not have java. Then system java is the only one in the PATH. Which, if your system is older, is Java 1.7, and minced fails.

The way to solve it is this, and many Java tools do this in their wrapper:

java=java
if [ -e "$JAVA_HOME/bin/java" ]; then
  java="$JAVA_HOME/bin/java"
fi

exec $java -jar $PHYS_DIR/minced.jar $*

I would love to see a 0.4.1 version out soon :-)

ctSkennerton commented 5 years ago

done

tseemann commented 5 years ago

⚡️