Ubuntu: 14.04.4 LTS
Java Version: 1.8.0_74

I installed Jstock ( via this: http://jstock.org/help_install_upgrade.html#install-linux
So I start the programm via ./jstock.sh

When I start Jstock I get:

Warning: /usr/bin does not exist

Then the program starts.

Even if the folder obviously exist, and also I found /usr/share/java, so this also exists.
When I type whereis java it says:

java: /usr/bin/java /usr/bin/X11/java /usr/share/java /usr/share/java /usr/share/man/man1/java.1.gz

The jstock.sh file says:

# Normally, editing this script should not be required.
# Only case is to set up JAVA_HOME if it's not already defined.
# To specify an alternative JVM, edit and uncomment the following 
# line and change the path accordingly.

if [ -n $JAVA_HOME ] ; then
    if [ -f "$_TMP" ] ; then
        if [ -x "$_TMP" ] ; then
            echo "Warning: $_TMP is not executable"
        echo "Warning: $_TMP does not exist"
if ! which "$_JAVA_EXEC" >/dev/null ; then
    echo "Error: No Java Runtime Environment found"
    echo "Please set the environment variable JAVA_HOME to the root       directory of your SUN Java installation, e.g. by editing the 7th line in this     launcher script."
    exit 1

# Resolve the location of the JStock installation.
# This includes resolving any symlinks.
while [ -h "$PRG" ]; do
    ls=`ls -ld "$PRG"`
    link=`expr "$ls" : '^.*-> \(.*\)$' 2>/dev/null`
    if expr "$link" : '^/' 2> /dev/null >/dev/null; then
        PRG="`dirname "$PRG"`/$link"

JSTOCK_BIN=`dirname "$PRG"`
cd "${JSTOCK_BIN}"

_VMOPTIONS="-Xms64m -Xmx512m"
$_JAVA_EXEC $_VMOPTIONS -jar jstock.jar

The program works fine, but since I want to use it in reality I want the program to fully function, without any error.

btw: How can I write here like a normal human being? I made weird spaces to avoid writing everything in one line. Thx !


Changing the line _TMP="$JAVA_HOME/usr/bin to _TMP="$JAVA_HOME/usr/bin/java works for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.