Date: Wed, 12 May 2010 15:50:30 -0400 From: Mike Jakubik <mike.jakubik@intertainservices.com> To: freebsd-java@freebsd.org Subject: Re: realpath: : No such file or directory Message-ID: <4BEB0686.6050603@intertainservices.com> In-Reply-To: <20100512190726.GD83316@deviant.kiev.zoral.com.ua> References: <4BEAC59B.9040105@intertainservices.com> <20100512152515.GA75759@misty.eyesbeyond.com> <4BEAC9A0.4050105@intertainservices.com> <20100512154024.GB75759@misty.eyesbeyond.com> <4BEAD2B6.8080300@intertainservices.com> <20100512165009.GB83316@deviant.kiev.zoral.com.ua> <4BEAE3B8.6040805@intertainservices.com> <20100512190726.GD83316@deviant.kiev.zoral.com.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
On 5/12/2010 3:07 PM, Kostik Belousov wrote: > > The realpath(1) was given an empty path. > > According to SUSv4, realpath(3) should return ENOENT if "A component of > file_name does not name an existing file or file_name points to an empty > string." This was recently brought into standard compliance. > > Why javavm passes empty path to realpath(1), I do not know. > It appears the cause is because ${JAVA_HOME} is an empty variable. --- # # Set up an appropriate JAVA_HOME # setJavaHome() { echo Debug JAVA_HOME: ${JAVA_HOME} echo Debug JAVAVM_PREFIX: ${_JAVAVM_PREFIX} # Use JAVA_HOME if it's set, unless its set to /usr/local if [ -n "${JAVA_HOME}" -a \ "`realpath "${JAVA_HOME}"`" != "`realpath "${_JAVAVM_PREFIX}"`" ]; then if [ -n "${JAVA_HOME}" -a -f "${JAVA_HOME}/bin/${_JAVAVM_PROG}" ]; then _JAVAVM_PROG_PATH="${JAVA_HOME}/bin" return 0 elif [ -n "${JAVA_HOME}" -a \ -f "${JAVA_HOME}/jre/bin/${_JAVAVM_PROG}" ]; then _JAVAVM_PROG_PATH="${JAVA_HOME}/jre/bin" return 0 fi fi unset JAVA_HOME --- When i run the above: + setJavaHome + echo Debug JAVA_HOME: Debug JAVA_HOME: + echo Debug JAVAVM_PREFIX: /usr/local Debug JAVAVM_PREFIX: /usr/local + realpath '' realpath: : No such file or directory
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4BEB0686.6050603>