[Swift-devel] Swift shell script and JAVA_HOME
David Kelly
dk0966 at cs.ship.edu
Tue Jul 20 07:00:23 CDT 2010
Hello,
I noticed on login.ci.uchicago.edu that I was not able to launch swift. Even
though I had "+java-sun" in ~/.soft, the system was pointing me to gcj.
Normally in ubuntu, something like "update-java-alternatives -s java-6-sun"
lets you switch JVMs, but as far I know it makes changes system wide
(requiring root access) and not on a per-user basis. Then I set $JAVA_HOME
to the correct path and it still wouldn't launch. Should the swift shell
script test for $JAVA_HOME to determine the correct location? Maybe
something like this would work:
### EXECUTE ############
if test -n "$CYGWIN"; then
set CLASSPATHSAVE=$CLASSPATH
export CLASSPATH="$LOCALCLASSPATH"
eval java ${OPTIONS} ${COG_OPTS} ${EXEC} ${CMDLINE}
export CLASSPATH=$CLASSPATHSAVE
else
if [ -n "$JAVA_HOME" ]; then
eval $JAVA_HOME/bin/java ${OPTIONS} ${COG_OPTS} -classpath
${LOCALCLASSPATH} ${EXEC} ${CMDLINE}
else
eval java ${OPTIONS} ${COG_OPTS} -classpath ${LOCALCLASSPATH}
${EXEC} ${CMDLINE}
fi
fi
return_code=$?
exit $return_code
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/swift-devel/attachments/20100720/f2634b92/attachment.html>
More information about the Swift-devel
mailing list