use scilab with existing java

e-letter inpost at gmail.com
Wed Nov 2 23:37:58 CET 2011


Readers,

The tarball was downloaded and expanded.

Java is installed at:

/usr/local/java/java/

The bash profile file contains:

export JAVA_HOME=/usr/local/java/java/jre/bin/java
PATH=$PATH:/usr/local/java/java/jre/bin:/usr/local/bin
export PATH

The libjava file is at:

/usr/local/java/java/jre/lib/i386/libjava.so

The scilab file was edited:

detect_java_vm() {

    proc="i386"

    # If the user has the variable JAVA_HOME in the ENV

    if test -n "$JAVA_HOME" ; then

        if test $SCIVERBOSE -ne 0; then
            echo "Using specified vm: $JAVA_HOME"
        fi

#        if test ! -x "$JAVA_HOME/bin/java" ; then
        if test ! -x "$JAVA_HOME" ; then
            echo "Cannot find $JAVA_HOME/bin/java"
            exit 1
        else
            JAVA_BINDIR=$JAVA_HOME/bin
        fi

        # Manage JRE & JDK because libjava.so and others are stored in the JRE
        if test -d $JAVA_HOME/jre; then
            JRE_HOME=$JAVA_HOME/jre
        else
            JRE_HOME=$JAVA_HOME
        fi

        # Configuring LD_LIBRARY_PATH for libjava.so libhpi.so and libxxxx.so

        JAVA_SHLIB="libjava.so"
#        LIBJAVA="$JRE_HOME/lib/$proc/$JAVA_SHLIB"
        LIBJAVA="$JRE_HOME/../../lib/i386/$proc/$JAVA_SHLIB"

Trying to start scilab causes an error:

/usr/local/scilab/scilab/bin/scilab

Could not load JVM dynamic library (libjava).
Error: libjvm.so: cannot open shared object file: No such file or directory
If you are using a binary version of Scilab, please report a bug
http://bugzilla.scilab.org/.
If you are using a self-built version of Scilab, update the script
bin/scilab to provide the path to the JVM.
The problem might be related to SELinux. Try to deactivate it.

Scilab cannot open JVM library.

Any help please?



More information about the users mailing list