You are not logged in.

#1 2009-11-03 22:34:17

Scattenlaeufer
Member
Registered: 2009-04-05
Posts: 17

Maple 12 and JVM

Hello,

I am not quite sure, if its the right place here, but I dont know where else to post it. So here is my problem:

For my studies in physics, I need Maple 12 as tool for analytic mathematics, but it doesnt work properly with my arch. When I start xmaple, I only get a plain window without the gui, which should be there. I had the same problem about a year ago using Ubuntu and then I only had to redefine the path to my JVM in maple12/bin/maple, so I think its the same again, but the solution I had under Ubuntu didnt work for ach:

I looked up the path to my JVM with

which java

and placed it in the mentioned file, but it didnt fix the problem.

I tried jre as well as openjdk, but both didnt work.

Using Maple in terminal works properly, only the gui is the problem.

So is there anyone, who is able to help me, so that I can use Maple in terminal as well as with gui?

Offline

#2 2009-11-03 23:09:15

Nepherte
Member
From: Singapore
Registered: 2008-09-09
Posts: 427

Re: Maple 12 and JVM

Are you using 64 bit or 32 bit? I've put the path of my jvm in bin/xmaple but that shouldn't make a difference (note that it ran with the built in jvm too). Can you post that file you edited (or the parts you changed)?.

Offline

#3 2009-11-04 14:01:29

Scattenlaeufer
Member
Registered: 2009-04-05
Posts: 17

Re: Maple 12 and JVM

At first, I'm using 64bit.

Second, I added the following lines:

#override the Maple JRE Bin so it points to sun java 6
MAPLE_JRE_BIN="/usr/bin/"

I added then at first to the bin/maple:

#!/bin/sh

# Copyright (c) 1996-2005 by Maplesoft, a division of Waterloo Maple Inc.
# All rights reserved. Unauthorized duplication prohibited.
# Permission is granted to modify this file to be appropriate
# for use at the installation for which Maple was purchased.

# This script is used to start the TTY, Java, and X11/Motif versions
# of Maple.

# maple invokes the command line version of Maple
# maple -x runs Maple using the Java worksheet
# maple -cw runs Maple using the classic worksheet

# Set the MAPLE environment variable. This variable is needed both by this
# script (to find various files), and by the Maple kernel and interface.
# Change the following line appropriately for your site if you did not
# install Maple in the directory indicated.
MAPLE='/home/bjoern/maple12'
export MAPLE

# Start by determining the system we are running on.
MAPLE_SYS_BIN=`"$MAPLE/bin/maple.system.type"`

# In order to link to MATLAB from within Maple, correct the following path 
# and uncomment the next four lines, or define the environment variable, 
# $MATLAB_BASEDIR outside this script.
# if [ -z "$MATLAB_BASEDIR" ] ; then
#     MATLAB_BASEDIR=/usr/local/matlab
#     export MATLAB_BASEDIR
# fi

# For HPUX users, you many need to uncomment the
# if [ "$MAPLE_SYS_BIN" = "bin.HP_RISC_UNIX" ] ; then
#     XKEYSYMDB=/usr/openwin/lib/XKeysymDB
#     export XKEYSYMDB
# fi

# For Solaris users, you may need to uncomment the following four lines.
# following four lines and set the path for XKeysymDB correctly.
# if [ "$MAPLE_SYS_BIN" = "bin.SUN_SPARC_SOLARIS" ] ; then
#     XKEYSYMDB=/usr/lib/X11/XKeysymDB
#     export XKEYSYMDB
# fi

############################################################################
##                                                                        ##
##   In general it is not necessary to edit this file beyond this point   ##
##                                                                        ##
############################################################################

# Parse all command line parameters. Parameters are collected into kernel
# and Iris parameters. The special parameter -x is used to start the X
# Window (Motif) interface.
PARAM=
IPARAM=
XMAPLE=
JAVAWORKSHEET=
INSTALL=
DISPLAYARG=""
JAVAHEAP=400
CUSTOMHEAP=0
JVM_OPTIONS=
NORUN=false

while [ $# -ne 0 ]
do
    case "$1" in
    -x)
        JAVAWORKSHEET=1
        LOCALE="-locale en"
        ;;
    -cw)
        XMAPLE=1
        ;;
    -norun)
        NORUN=true
        ;;
    -single)
        IPARAM="-km s"
        ;;
    -parallel)
        IPARAM="-km p"
        ;;
    -binary)
        if [ $# -gt 1 ]
        then
            if [ -r "$MAPLE/bin.$2" ]
            then
                MAPLE_SYS_BIN="bin.$2"
            else
                echo "$0: binary $2 is not found"
                exit 1
            fi
            shift
        else
            echo "$0: binary name is required"
            exit 1
        fi
        ;;
    -d|-display)
        if [ $# -gt 1 ]
        then
            DISPLAYARG="-d \"$2\""
            shift
        else
            echo "$0: display name required"
        fi
        ;;
    -j)
        JAVAHEAP=400
        if [ $# -gt 1 ]
        then
            case $2 in
            -*)
                ;;
            *)
                CUSTOMHEAP=1
                JAVAHEAP=$2
                shift
                ;;
            esac
        fi
        ;;
    -MapleViewer)
        if [ $# = 1 ]
        then    echo "$0: -MapleViewer option requires a URL";
            exit 1
        fi
        JVM_OPTIONS="${JVM_OPTIONS} -DMapleViewer.url=$2"
                shift
        ;;
    *)
        PARAM="$PARAM \"$1\""
        ;;
    esac
    shift
done

#Add standard maple preprocessor include directory to command line
INCLUDES="-I \"$MAPLE/lib/include\""

# Special per-platform processing
#
case $MAPLE_SYS_BIN in
    "bin.HP_RISC_UNIX")
        # For HP700 systems
        MAPLE_JRE_BIN="$MAPLE/jre.HP_RISC_UNIX/bin/"
        JRE_ROOT="$MAPLE/jre.HP_RISC_UNIX/lib"
        JRE_LIB1="$JRE_ROOT/PA_RISC/server"
        JRE_LIB2="$JRE_ROOT/PA_RISC/native_threads"
        JRE_LIB3="$JRE_ROOT/PA_RISC/"
        SHLIB_PATH="$MAPLE/$MAPLE_SYS_BIN:$JRE_LIB1:$JRE_LIB2:$JRE_LIB3:$SHLIB_PATH"
        if [ "$MATLAB_BASEDIR" ] ; then
            SHLIB_PATH="$SHLIB_PATH:$MATLAB_BASEDIR/extern/lib/hp700:$MATLAB_BASEDIR/sys/opengl/lib/hpux"
            PATH="$MATLAB_BASEDIR/bin:$PATH"
        fi
        export SHLIB_PATH
        ;;
    "bin.IBM_RISC_UNIX")
        # For RS/6000 systems
        MAPLE_JRE_BIN="$MAPLE/jre.IBM_RISC_UNIX/bin/"
        JRE_ROOT="$MAPLE/jre.IBM_RISC_UNIX/bin"
        JRE_LIB1="$JRE_ROOT/classic"
        JRE_LIB2="$JRE_ROOT"

        LIBPATH="$MAPLE/$MAPLE_SYS_BIN:$JRE_LIB1:$JRE_LIB2:$LIBPATH"

        if [ "$MATLAB_BASEDIR" ] ; then
            LIBPATH=$LIBPATH:$MATLAB_BASEDIR/extern/lib/ibm_rs
            PATH=$MATLAB_BASEDIR/bin:$PATH
        fi
        export LIBPATH
        ;;
    "bin.SUN_SPARC_SOLARIS")
        # For Sun Sparc Solaris systems
        MAPLE_JRE_BIN="$MAPLE/jre.SUN_SPARC_SOLARIS/bin/"
        JRE_ROOT="$MAPLE/jre.SUN_SPARC_SOLARIS"
        JRE_LIB1="$JRE_ROOT/lib/sparc/client"
        JRE_LIB2="$JRE_ROOT/lib/sparc/native_threads"
        JRE_LIB3="$JRE_ROOT/lib/sparc"

        LD_LIBRARY_PATH="$MAPLE/$MAPLE_SYS_BIN:$JRE_LIB1:$JRE_LIB2:$JRE_LIB3:$LD_LIBRARY_PATH"

        if [ "$MATLAB_BASEDIR" ] ; then
            LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$MATLAB_BASEDIR/extern/lib/sol2:$MATLAB_BASEDIR/bin/sol2"
            PATH="$MATLAB_BASEDIR/bin:$PATH"
        fi
        # For platform-accelerated shared libraries
        if [ -x /usr/bin/isalist -a -x /usr/bin/grep ]; then
            if [ "`isalist | grep 'sparcv8plus+vis'`" != "" ]; then
                LD_LIBRARY_PATH="$MAPLE/$MAPLE_SYS_BIN/sparcv8plusa:$LD_LIBRARY_PATH"
            fi
        fi
        export LD_LIBRARY_PATH
        ;;
    "bin.DEC_ALPHA_UNIX")
        if [ "$JAVAWORKSHEET" ]
        then
          echo "Standard Worksheet is not available for this platform. Use the maple -cw to start the Classic Worksheet."
          exit 1
        fi
        # For Dec Alpha Unix systems
        MAPLE_JRE_BIN="$MAPLE/jre.DEC_ALPHA_UNIX/bin/"
        JRE_ROOT="$MAPLE/jre.DEC_ALPHA_UNIX"
        JRE_LIB1="$JRE_ROOT/lib/alpha/classic"
        JRE_LIB2="$JRE_ROOT/lib/alpha/native_threads"
        JRE_LIB3="$JRE_ROOT/lib/alpha"

        LD_LIBRARY_PATH="$MAPLE/$MAPLE_SYS_BIN:$JRE_LIB1:$JRE_LIB2:$JRE_LIB3:$LD_LIBRARY_PATH"
        if [ "$MATLAB_BASEDIR" ] ; then
            LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$MATLAB_BASEDIR/extern/lib/alpha"
            PATH="$MATLAB_BASEDIR/bin:$PATH"
        fi
        export LD_LIBRARY_PATH
        ;;
    "bin.SGI_MIPS_UNIX")
        if [ "$JAVAWORKSHEET" ]
        then
          echo "Standard Worksheet is not available for this platform. Use the maple -cw to start the Classic Worksheet."
          exit 1
        fi
        # For SGI Unix systems
        MAPLE_JRE_BIN="$MAPLE/jre.SGI_MIPS_UNIX/bin32/"
        JRE_ROOT="$MAPLE/jre.SGI_MIPS_UNIX"
        JRE_LIB1="$JRE_ROOT/lib32/sgi/client"
        JRE_LIB2="$JRE_ROOT/lib32/sgi/native_threads"
        JRE_LIB3="$JRE_ROOT/lib32/sgi"
        LD_LIBRARY_PATH="$MAPLE/$MAPLE_SYS_BIN:$JRE_LIB1:$JRE_LIB2:$JRE_LIB3:$LD_LIBRARY_PATH"
        LD_LIBRARYN32_PATH="$MAPLE/$MAPLE_SYS_BIN:$JRE_LIB1:$JRE_LIB2:$JRE_LIB3:$LD_LIBRARYN32_PATH"
        if [ "$MATLAB_BASEDIR" ] ; then
            LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$MATLAB_BASEDIR/extern/lib/sgi:$MATLAB_BASEDIR/bin/sgi"
            LD_LIBRARYN32_PATH="$LD_LIBRARYN32_PATH:$MATLAB_BASEDIR/extern/lib/sgi:$MATLAB_BASEDIR/bin/sgi"
            PATH="$MATLAB_BASEDIR/bin:$PATH"
        fi
        export LD_LIBRARY_PATH LD_LIBRARYN32_PATH
        ;;
    "bin.X86_64_LINUX")
        if [ "$XMAPLE" ]
        then
            echo "Classic Worksheet is not available for this platform. Use the xmaple or maple -x to start the Standard Worksheet."
            exit 1
        fi
        MAPLE_JRE_BIN="$MAPLE/jre.X86_64_LINUX/bin/"
        JRE_ROOT="$MAPLE/jre.X86_64_LINUX/lib"
        JRE_LIB1="$JRE_ROOT/amd64"
        JRE_LIB2="$JRE_ROOT/amd64/server"
        JRE_LIB3="$JRE_ROOT/amd64/native_threads"

        LD_LIBRARY_PATH="$MAPLE/$MAPLE_SYS_BIN:$JRE_LIB1:$JRE_LIB2:$JRE_LIB3:$LD_LIBRARY_PATH"
        if [ "$MATLAB_BASEDIR" ] ; then
            LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$MATLAB_BASEDIR/extern/lib/glnxa64:$MATLAB_BASEDIR/sys/os/glnxa64:$MATLAB_BASEDIR/bin/glnxa64"
            PATH="$MATLAB_BASEDIR/bin:$PATH"
        fi
        export LD_LIBRARY_PATH
        ;;
    "bin.ITANIUM_LINUX")
        if [ "$XMAPLE" ]
        then
            echo "Classic Worksheet is not available for this platform. Use the xmaple or maple -x to start the Standard Worksheet."
            exit 1
        fi
        MAPLE_JRE_BIN="$MAPLE/jre.ITANIUM_LINUX/bin/"
        JRE_ROOT="$MAPLE/jre.ITANIUM_LINUX/lib"
        JRE_LIB1="$JRE_ROOT/ia64"
        JRE_LIB2="$JRE_ROOT/ia64/server"
        JRE_LIB3="$JRE_ROOT/ia64/native_threads"

        LD_LIBRARY_PATH="$MAPLE/$MAPLE_SYS_BIN:$JRE_LIB1:$JRE_LIB2:$JRE_LIB3:$LD_LIBRARY_PATH"
                # MATLAB is not supported on this platform
        # if [ "$MATLAB_BASEDIR" ] ; then
            #LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$MATLAB_BASEDIR/extern/lib/glnx86:$MATLAB_BASEDIR/sys/os/glnx86"
            #PATH="$MATLAB_BASEDIR/bin:$PATH"
        # fi
        # For platform-accelerated ATLAS shared library
        ADDLIB=`"$MAPLE/bin/linux_shlibs" "$MAPLE/$MAPLE_SYS_BIN"`
        if [ "$ADDLIB" != "" ]; then
            LD_LIBRARY_PATH="$ADDLIB:$LD_LIBRARY_PATH"
        fi
        export LD_LIBRARY_PATH

        if [ -r "/etc/redhat-release" ]
        then
            MR_CHECK=`perl -ane '$_ =~ /Mandrake Linux release (\d+)\.(\d+)/; print $1 if $1 >= 9;' /etc/redhat-release`

            RH_CHECK=`perl -ane '$_ =~ /Red Hat .* release (\d+)(\.\d+)?/; print $1 if ($1 >= 7);' /etc/redhat-release`

            if [ $MR_CHECK ]; then
                export LD_ASSUME_KERNEL=2.2.5
            fi
            if [ $RH_CHECK ]; then
                export LD_ASSUME_KERNEL=2.2.5
            fi
        fi
    ;;
    "bin.IBM_INTEL_LINUX")
        MAPLE_JRE_BIN="$MAPLE/jre.IBM_INTEL_LINUX/bin/"
        JRE_ROOT="$MAPLE/jre.IBM_INTEL_LINUX/lib"
        JRE_LIB1="$JRE_ROOT/i386"
        JRE_LIB2="$JRE_ROOT/i386/client"
        JRE_LIB3="$JRE_ROOT/i386/native_threads"

        LD_LIBRARY_PATH="$MAPLE/$MAPLE_SYS_BIN:$JRE_LIB1:$JRE_LIB2:$JRE_LIB3:$LD_LIBRARY_PATH"
        if [ "$XMAPLE" ]
        then
            LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$MAPLE/$MAPLE_SYS_BIN/opengl"
        fi
        if [ "$MATLAB_BASEDIR" ] ; then
            LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$MATLAB_BASEDIR/extern/lib/glnx86:$MATLAB_BASEDIR/sys/os/glnx86:$MATLAB_BASEDIR/bin/glnx86"
            PATH="$MATLAB_BASEDIR/bin:$PATH"
        fi
        # For platform-accelerated ATLAS shared library
        ADDLIB=`"$MAPLE/bin/linux_shlibs" "$MAPLE/$MAPLE_SYS_BIN"`
        if [ "$ADDLIB" != "" ]; then
            LD_LIBRARY_PATH="$ADDLIB:$LD_LIBRARY_PATH"
        fi
        export LD_LIBRARY_PATH

        if [ -r "/etc/redhat-release" ]
        then
            MR_CHECK=`perl -ane '$_ =~ /Mandrake Linux release (\d+)\.(\d+)/; print $1 if $1 >= 9;' /etc/redhat-release`

            RH_CHECK=`perl -ane '$_ =~ /Red Hat .* release (\d+)(\.\d+)?/; print $1 if ($1 >= 7);' /etc/redhat-release`

            if [ $MR_CHECK ]; then
                export LD_ASSUME_KERNEL=2.2.5
            fi
            if [ $RH_CHECK ]; then
                export LD_ASSUME_KERNEL=2.2.5
            fi
        fi
        ;;
    "bin.APPLE_PPC_OSX")
        # Don't over-ride the default jre
        MAPLE_JRE_BIN=
        DYLD_LIBRARY_PATH="/System/Library/Frameworks/JavaVM.framework/Libraries:$MAPLE/$MAPLE_SYS_BIN:$DYLD_LIBRARY_PATH"
        if [ "$MATLAB_BASEDIR" ] ; then
            DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:$MATLAB_BASEDIR/extern/lib/mac:$MATLAB_BASEDIR/bin/mac:$MATLAB_BASEDIR/sys/os/mac"
            PATH="$PATH:$MATLAB_BASEDIR/bin:$MATLAB_BASEDIR/bin/mac:$MATLAB_BASEDIR/sys/os/mac"
            export PATH
        fi
        export DYLD_LIBRARY_PATH
        VMOPTIONS="-Xdock:icon='$MAPLE/../Resources/LaunchAnywhere.icns' -Xdock:name='Maple 12'"
        DLIMIT=`ulimit -d`
        if [ "$DLIMIT" = 6144 ]
        then
            ulimit -d 512000 1>/dev/null 2>&1 || ulimit -d 409600 1>/dev/null 2>&1 || ulimit -d 1>/dev/null 2>&1 307200
        fi
        SLIMIT=`ulimit -s`
        if [ "$SLIMIT" = 512 ]
        then
            ulimit -s 65536 1>/dev/null 2>&1 || ulimit -s 32768 1>/dev/null 2>&1 || ulimit -s 1638 1>/dev/null 2>&1 4
        fi
        ;;
    "bin.APPLE_UNIVERSAL_OSX")
        # Don't over-ride the default jre
        MAPLE_JRE_BIN=
        DYLD_LIBRARY_PATH="/System/Library/Frameworks/JavaVM.framework/Libraries:$MAPLE/$MAPLE_SYS_BIN:$DYLD_LIBRARY_PATH"
        if [ "$MATLAB_BASEDIR" ] ; then
            PROCESSOR=`uname -p`
            case $PROCESSOR in
                powerpc)
                    DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:$MATLAB_BASEDIR/extern/lib/mac:$MATLAB_BASEDIR/bin/mac:$MATLAB_BASEDIR/sys/os/mac"
                    PATH="$PATH:$MATLAB_BASEDIR/bin:$MATLAB_BASEDIR/bin/mac:$MATLAB_BASEDIR/sys/os/mac"
                ;;
                *)
                    DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:$MATLAB_BASEDIR/extern/lib/maci:$MATLAB_BASEDIR/bin/maci:$MATLAB_BASEDIR/sys/os/maci"
                    PATH="$PATH:$MATLAB_BASEDIR/bin:$MATLAB_BASEDIR/bin/maci:$MATLAB_BASEDIR/sys/os/maci"
                ;;
            esac
            export PATH
        fi
        export DYLD_LIBRARY_PATH
        VMOPTIONS="-Xdock:icon='$MAPLE/../Resources/LaunchAnywhere.icns' -Xdock:name='Maple 12'"
        DLIMIT=`ulimit -d`
        if [ "$DLIMIT" = 6144 ]
        then
            ulimit -d 512000 1>/dev/null 2>&1 || ulimit -d 409600 1>/dev/null 2>&1 || ulimit -d 1>/dev/null 2>&1 307200
        fi
        SLIMIT=`ulimit -s`
        if [ "$SLIMIT" = 512 ]
        then
            ulimit -s 65536 1>/dev/null 2>&1 || ulimit -s 32768 1>/dev/null 2>&1 || ulimit -s 1638 1>/dev/null 2>&1 4
        fi
        ;;
    *)
        ;;
esac

# This variable tells Maple's Motif interface where to find its resource
# file. This should be set even if TTY Maple is being run, as the user
# might still open a Motif plot window.
XUSERFILESEARCHPATH="$MAPLE/X11_defaults/Maple"
export XUSERFILESEARCHPATH

#override the Maple JRE Bin so it points to sun java 6
MAPLE_JRE_BIN="/usr/bin/"

# Set the PATH so that Maple can find its various auxiliary programs.
if [ "$MAPLE_JRE_BIN" ]
then
    PATH="$MAPLE_JRE_BIN:$PATH"
fi
PATH="$MAPLE/$MAPLE_SYS_BIN:$PATH"
export PATH

# Start Maple in the desired mode: ttyp, java worksheet or classic worksheet modes
# TTY version is started.
if [ "$NORUN" = "false" ]
then

    if [ "$XMAPLE" ]
    then
       eval "'${MAPLE}/$MAPLE_SYS_BIN/maplew'" $IPARAM $DISPLAYARG $PARAM
    elif [ "$JAVAWORKSHEET" ]
    then
        if [ -z "$DISPLAY" ]; then
            if [ "$MAPLE_SYS_BIN" != "bin.APPLE_PPC_OSX" -o "$MAPLE_SYS_BIN" != "bin.APPLE_UNIVERSAL_OSX" ]; then
                echo "Error: Can't open display: \"$DISPLAY\""
                exit 1
            fi
        fi
        WKSCLASSPATH=
        BOOTCLASSPATH=
        X_BOOTCLASSPATH_P=
        WKSJARPATH="$MAPLE/java/"
        WKSAPP=com.maplesoft.worksheet.application.WmiWorksheet
        BOOTJARS="xercesImpl xmlParserAPIs xalan"

        for JAR in $BOOTJARS
        do
            if [ "$BOOTCLASSPATH" != "" ]
            then
                BOOTCLASSPATH="${BOOTCLASSPATH}:"
            fi
            BOOTCLASSPATH=${BOOTCLASSPATH}${WKSJARPATH}${JAR}.jar
        done

        if [ "$MAPLE_SYS_BIN" = "bin.IBM_RISC_UNIX" ]
        then
            X_BOOTCLASSPATH_P="-Xbootclasspath/p:$BOOTCLASSPATH"
            WKSCLASSPATH=""
        else
            X_BOOTCLASSPATH_P=""
            WKSCLASSPATH="$BOOTCLASSPATH"
        fi

        for JAR in "${WKSJARPATH}"/*.jar
        do
            case $JAR in
            "$WKSJARPATH"/*update*.jar)
        if [ "$X_BOOTCLASSPATH_P" ]
        then
            eval "'${MAPLE_JRE_BIN}java'" -Xmx${JAVAHEAP}m ${JVM_OPTIONS} "'${X_BOOTCLASSPATH_P}'" -cp "'$WKSCLASSPATH'" "-Dmaple.bin.path='$MAPLE/$MAPLE_SYS_BIN' ${VMOPTIONS}" "$WKSAPP" $PARAM $LOCALE
        else
            eval "'${MAPLE_JRE_BIN}java'" -Xmx${JAVAHEAP}m ${JVM_OPTIONS} -cp "'$WKSCLASSPATH'" "-Dmaple.bin.path='$MAPLE/$MAPLE_SYS_BIN' ${VMOPTIONS}" "$WKSAPP" $PARAM $LOCALE
        fi
    else
        if [ "$IPARAM" ]
        then
            echo "$0: invalid parameters: $IPARAM"
        else
            eval exec "'${MAPLE}/$MAPLE_SYS_BIN/cmaple'" $INCLUDES $PARAM
        fi
    fi
fi
        if [ "$X_BOOTCLASSPATH_P" ]
        then
            eval "'${MAPLE_JRE_BIN}java'" -Xmx${JAVAHEAP}m ${JVM_OPTIONS} "'${X_BOOTCLASSPATH_P}'" -cp "'$WKSCLASSPATH'" "-Dmaple.bin.path='$MAPLE/$MAPLE_SYS_BIN' ${VMOPTIONS}" "$WKSAPP" $PARAM $LOCALE
        else
            eval "'${MAPLE_JRE_BIN}java'" -Xmx${JAVAHEAP}m ${JVM_OPTIONS} -cp "'$WKSCLASSPATH'" "-Dmaple.bin.path='$MAPLE/$MAPLE_SYS_BIN' ${VMOPTIONS}" "$WKSAPP" $PARAM $LOCALE
        fi
    else
        if [ "$IPARAM" ]
        then
            echo "$0: invalid parameters: $IPARAM"
        else
            eval exec "'${MAPLE}/$MAPLE_SYS_BIN/cmaple'" $INCLUDES $PARAM
        fi
    fi
fi
                case $JAR in
                "$WKSJARPATH/update.jar")
                    if [ "$WKSCLASSPATH" != "" ]
                    then
                        WKSCLASSPATH="${WKSCLASSPATH}:"
                    fi
                    WKSCLASSPATH=${WKSCLASSPATH}${JAR}
                    ;;
                *)
                    ;;
                esac
                ;;
            *)
                if [ "$WKSCLASSPATH" != "" ]
                then
                    WKSCLASSPATH="${WKSCLASSPATH}:"
                fi
                WKSCLASSPATH=${WKSCLASSPATH}${JAR}
                ;;
            esac
        done

        DLIMIT=`ulimit -d`
        if [ $DLIMIT != "unlimited" ]; then
            if [ $DLIMIT -lt 512000 ]; then
                ulimit -d 512000 2>/dev/null || ulimit -d 409600 2>/dev/null || ulimit -d 307200 2>/dev/null || echo "Unable to set the required datalimit.  Maple may not function properly."
                DLIMIT=`ulimit -d`
                if [ $CUSTOMHEAP -ne 0 ]; then
                    JAVAHEAP=`expr $DLIMIT / 1024 - 50`
                fi
            fi
        fi
        VLIMIT=`ulimit -v`
        if [ $VLIMIT != "unlimited" ]; then
            if [ $VLIMIT -lt 640000 ]; then
                ulimit -v 640000 2>/dev/null || ulimit -v 512000 || ulimit -v 409600 2>/dev/null || ulimit -v 307200 2>/dev/null || echo "Unable to set the required virtual memory limit.  Maple may not function properly."
            fi
        fi

        if [ "$X_BOOTCLASSPATH_P" ]
        then
            eval "'${MAPLE_JRE_BIN}java'" -Xmx${JAVAHEAP}m ${JVM_OPTIONS} "'${X_BOOTCLASSPATH_P}'" -cp "'$WKSCLASSPATH'" "-Dmaple.bin.path='$MAPLE/$MAPLE_SYS_BIN' ${VMOPTIONS}" "$WKSAPP" $PARAM $LOCALE
        else
            eval "'${MAPLE_JRE_BIN}java'" -Xmx${JAVAHEAP}m ${JVM_OPTIONS} -cp "'$WKSCLASSPATH'" "-Dmaple.bin.path='$MAPLE/$MAPLE_SYS_BIN' ${VMOPTIONS}" "$WKSAPP" $PARAM $LOCALE
        fi
    else
        if [ "$IPARAM" ]
        then
            echo "$0: invalid parameters: $IPARAM"
        else
            eval exec "'${MAPLE}/$MAPLE_SYS_BIN/cmaple'" $INCLUDES $PARAM
        fi
    fi
fi

Then I added it to the bin/xmaple, but that also solved nothing:

#!/bin/sh

# Copyright (c) 1993-2003 by Maplesoft, a division of Waterloo Maple Inc.
# All rights reserved. Unauthorized duplication prohibited.
# Permission is granted to modify this file to be appropriate
# for use at the installation for which Maple was purchased.

#override the Maple JRE Bin so it points to sun java 6
MAPLE_JRE_BIN="/usr/bin/"

# This script runs Maple with the Java interface.
MAPLE='/home/bjoern/maple12'
export MAPLE 

"${MAPLE}/bin/maple" -x $*

With the build in JVM it also didn't work for me. Starting Maple without changing anything was the very first thing I did.

Offline

#4 2009-11-05 12:17:20

LeoSolaris
Member
From: South Carolina
Registered: 2008-03-30
Posts: 354

Re: Maple 12 and JVM

You're telling maple that jre is located at /usr/bin when it should be located at (something like) /usr/bin/jre

When you specify a "path" to a binary, you need to include the full path... meaning it has to end in the binary's name.

Unless I'm wrong and Maple looks things up differently...  which is possible. If that's the case, I have no idea.

Here is where my "java" is located:

[zeddicus ~]$which java
/opt/java/jre/bin/java

Last edited by LeoSolaris (2009-11-05 12:23:21)


I keep getting distracted from my webserver project...

huh? oooh...  shiny!

Offline

#5 2009-11-05 14:24:26

Scattenlaeufer
Member
Registered: 2009-04-05
Posts: 17

Re: Maple 12 and JVM

Doing so makes no difference, Maple still doesn't work.

Offline

#6 2009-11-05 14:48:15

Nepherte
Member
From: Singapore
Registered: 2008-09-09
Posts: 427

Re: Maple 12 and JVM

Hmm. Remove any modifications you've made and add

export MAPLE_JRE_BIN=$JAVA_HOME/bin
export JRE_ROOT=$JAVA_HOME/lib

at the top of either maple or xmaple. Verify that JAVA_HOME is actually set on startup:

echo $JAVA_HOME

With 64bit I also had to install lib32-gcc-libs and lib32-glibc.

Last edited by Nepherte (2009-11-05 14:49:10)

Offline

#7 2009-11-05 16:13:13

portix
Member
Registered: 2009-01-13
Posts: 757

Re: Maple 12 and JVM

Are you using a non-reparenting window-manager like dwm or awesome?

Offline

#8 2009-11-06 01:10:59

Scattenlaeufer
Member
Registered: 2009-04-05
Posts: 17

Re: Maple 12 and JVM

@Nepherte:
That also didn't work. I made as you said, but nothing happened. The two libs I already have installed.

@portix:
I'm using awesome. Could that have something to do with my problem?

Offline

#9 2009-11-06 08:38:13

portix
Member
Registered: 2009-01-13
Posts: 757

Re: Maple 12 and JVM

xmaple won't work with awesome. You can use a different wm or use the common
workspace, which is only available for the 32-bit version. You can install the
32-bit version with

linux32 sh installMapleLinux

and start the common workspace with

linux32 /path/to/maple -cw

You also have to install some lib32-packages, but i don't remember, which
packages must be installed.

Offline

#10 2009-11-06 13:20:09

Nepherte
Member
From: Singapore
Registered: 2008-09-09
Posts: 427

Re: Maple 12 and JVM

If you're using a tiling window manager, you could take a look at setwmname. I use xmonad and have to run setwmname "LG3D" for some java applications to draw their windows.

Offline

#11 2009-11-10 10:06:51

UQ-igor
Member
Registered: 2009-03-05
Posts: 42

Re: Maple 12 and JVM

I had the same problem with MATLAB and awesome (and dwm). I installed a program called wmname, then I run "wmname LG3D" and then matlab and it works fine. Theres a good chance the same will solve your problem.

Offline

#12 2009-11-10 13:23:44

Scattenlaeufer
Member
Registered: 2009-04-05
Posts: 17

Re: Maple 12 and JVM

@portix:
I have no clue, how to use your advice...
Can you tell me more detailed, what I have to do?

@Nepherte:
Where have I to run

setwmname "LG3D"

?

@UQ-igor
Running

wmname LG3D

in a shell made no difference.

Offline

#13 2009-11-10 13:41:07

portix
Member
Registered: 2009-01-13
Posts: 757

Re: Maple 12 and JVM

Maple has two different gui-versions. The older "common-workspace", and the new "normal"  workspace. The common workspace also works with awesome but there is no 64-bit-common workspace, so to use the common workspace, you can install the 32-bit version of Maple on your 64-bit system. Just run the Installskript with

linux32 sh /path/to/installscript

If you have installed the 32-bit version to the  directory $HOME/maple32 e.g., you can run maple with

linux32 $HOME/maple32/bin/maple -cw

It may happen,that you get some error messages like

/opt/Maple32/bin.IBM_INTEL_LINUX/maplew: error while loading shared libraries: libXt.so.6: wrong ELF class: ELFCLASS64

then you have to install lib32-libxt.

edit:the common workspace is really ugly, but starts much faster and is more  responsive.

Last edited by portix (2009-11-10 13:45:27)

Offline

#14 2009-11-10 15:07:22

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: Maple 12 and JVM

I decided to try maple (command line) with SSH X forwarding on Xmonad. smile

> plotsetup(maplet);
> plot(x^2);
Initializing Java runtime environment.

Works but for some reason I can't select menu items or open submenus.

> plot3d(x^2+y^2,x=-10..10,y=-10..10);
Xlib:  extension "GLX" missing on display "localhost:10.0".
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: String is null
        at sun.java2d.SunGraphics2D.drawString(SunGraphics2D.java:2744)
        ...
        and so on

Big mean error and no pretty picture. sad
Tried it again with no avail.

Of course I tried:

> maple -cw
Classic Worksheet is not available for this platform. Use the xmaple or maple -x to start the Standard Worksheet.

*sniff*
Computing services are going to hear from me.

In the mean time, does anyone have a link to a help document or page where maple's command line options are listed (and hopefully described)? I had a link but have lost it.


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#15 2009-12-07 16:43:11

Scattenlaeufer
Member
Registered: 2009-04-05
Posts: 17

Re: Maple 12 and JVM

@portix:
I installed maple as you said but now I get the following error:

linux32 ~/.maple12_32bit/bin/maple -cw
only the first 8192 fonts would be catched
/home/bjoern/.maple12_32bit/bin/maple: Zeile 411:  2188 Speicherzugriffsfehler  '/home/bjoern/.maple12_32bit/bin.IBM_INTEL_LINUX/maplew'

and sometimes I get:

linux32 ~/.maple12_32bit/bin/maple -cw
only the first 8192 fonts would be catched
*** glibc detected *** /home/bjoern/.maple12_32bit/bin.IBM_INTEL_LINUX/maplew: free(): invalid next size (fast): 0x0a4679a8 ***
======= Backtrace: =========
/opt/lib32/lib/libc.so.6(+0x6b6c1)[0xf71626c1]
/opt/lib32/lib/libc.so.6(+0x6cf18)[0xf7163f18]
/opt/lib32/lib/libc.so.6(cfree+0x6d)[0xf7166f8d]
/home/bjoern/.maple12_32bit/bin.IBM_INTEL_LINUX/maplew[0x808cde4]
/home/bjoern/.maple12_32bit/bin.IBM_INTEL_LINUX/maplew[0x8158113]
/home/bjoern/.maple12_32bit/bin.IBM_INTEL_LINUX/libmclient-maplew.so(+0x50f42)[0xf72f7f42]
/home/bjoern/.maple12_32bit/bin.IBM_INTEL_LINUX/libmclient-maplew.so(StreamDAG+0xc2)[0xf72f800e]
/home/bjoern/.maple12_32bit/bin.IBM_INTEL_LINUX/maplew[0x805d0e4]
/home/bjoern/.maple12_32bit/bin.IBM_INTEL_LINUX/maplew[0x81a261d]
/home/bjoern/.maple12_32bit/bin.IBM_INTEL_LINUX/maplew[0x81a242d]
/opt/lib32/usr/lib/libXt.so.6(+0x2784a)[0xf74de84a]
/opt/lib32/usr/lib/libXt.so.6(XtAppNextEvent+0xb4)[0xf74de984]
/opt/lib32/usr/lib/libXt.so.6(XtNextEvent+0x26)[0xf74dead6]
/home/bjoern/.maple12_32bit/bin.IBM_INTEL_LINUX/maplew[0x81a0189]
/home/bjoern/.maple12_32bit/bin.IBM_INTEL_LINUX/maplew[0x8182ad6]
/home/bjoern/.maple12_32bit/bin.IBM_INTEL_LINUX/maplew[0x809b238]
/home/bjoern/.maple12_32bit/bin.IBM_INTEL_LINUX/maplew[0x81eeced]
/opt/lib32/lib/libc.so.6(__libc_start_main+0xe6)[0xf710db86]
/home/bjoern/.maple12_32bit/bin.IBM_INTEL_LINUX/maplew(XMapRaised+0x35)[0x8055fa1]
======= Memory map: ========
08048000-08324000 r-xp 00000000 08:06 379337                             /home/bjoern/.maple12_32bit/bin.IBM_INTEL_LINUX/maplew
08324000-083d3000 rwxp 002db000 08:06 379337                             /home/bjoern/.maple12_32bit/bin.IBM_INTEL_LINUX/maplew
083d3000-083e9000 rwxp 00000000 00:00 0 
0a34c000-0a497000 rwxp 00000000 00:00 0                                  [heap]
f6e00000-f6e21000 rwxp 00000000 00:00 0 
f6e21000-f6f00000 ---p 00000000 00:00 0 
f6f57000-f6f74000 r-xp 00000000 08:08 24957                              /opt/lib32/usr/lib/libgcc_s.so.1
f6f74000-f6f75000 rwxp 0001c000 08:08 24957                              /opt/lib32/usr/lib/libgcc_s.so.1
f6f9e000-f70ac000 rwxp 00000000 00:00 0 
f70ac000-f70b6000 r-xp 00000000 08:08 25676                              /opt/lib32/lib/libnss_files-2.11.so
f70b6000-f70b7000 r-xp 00009000 08:08 25676                              /opt/lib32/lib/libnss_files-2.11.so
f70b7000-f70b8000 rwxp 0000a000 08:08 25676                              /opt/lib32/lib/libnss_files-2.11.so
f70b8000-f70bc000 r-xp 00000000 08:08 25032                              /opt/lib32/usr/lib/libXfixes.so.3.1.0
f70bc000-f70bd000 rwxp 00003000 08:08 25032                              /opt/lib32/usr/lib/libXfixes.so.3.1.0
f70bd000-f70c5000 r-xp 00000000 08:08 25028                              /opt/lib32/usr/lib/libXrender.so.1.3.0
f70c5000-f70c6000 rwxp 00007000 08:08 25028                              /opt/lib32/usr/lib/libXrender.so.1.3.0
f70c6000-f70ce000 r-xp 00000000 08:08 25154                              /opt/lib32/usr/lib/libXcursor.so.1.0.2
f70ce000-f70cf000 rwxp 00007000 08:08 25154                              /opt/lib32/usr/lib/libXcursor.so.1.0.2
f70cf000-f70d1000 rwxp 00000000 00:00 0 
f70d1000-f70d5000 r-xp 00000000 08:08 24915                              /opt/lib32/usr/lib/libXdmcp.so.6.0.0
f70d5000-f70d6000 rwxp 00003000 08:08 24915                              /opt/lib32/usr/lib/libXdmcp.so.6.0.0
f70d6000-f70d8000 r-xp 00000000 08:08 24913                              /opt/lib32/usr/lib/libXau.so.6.0.0
f70d8000-f70d9000 rwxp 00001000 08:08 24913                              /opt/lib32/usr/lib/libXau.so.6.0.0
f70d9000-f70dc000 r-xp 00000000 08:08 24752                              /opt/lib32/lib/libuuid.so.1.3.0
f70dc000-f70dd000 rwxp 00002000 08:08 24752                              /opt/lib32/lib/libuuid.so.1.3.0
f70dd000-f70de000 rwxp 00000000 00:00 0 
f70de000-f70f6000 r-xp 00000000 08:08 24569                              /opt/lib32/usr/lib/libxcb.so.1.1.0
f70f6000-f70f7000 rwxp 00017000 08:08 24569                              /opt/lib32/usr/lib/libxcb.so.1.1.0
f70f7000-f7237000 r-xp 00000000 08:08 25693                              /opt/lib32/lib/libc-2.11.so
f7237000-f7239000 r-xp 00140000 08:08 25693                              /opt/lib32/lib/libc-2.11.so
f7239000-f723a000 rwxp 00142000 08:08 25693                              /opt/lib32/lib/libc-2.11.so
f723a000-f723d000 rwxp 00000000 00:00 0 
f723d000-f7261000 r-xp 00000000 08:08 25706                              /opt/lib32/lib/libm-2.11.so
f7261000-f7262000 r-xp 00023000 08:08 25706                              /opt/lib32/lib/libm-2.11.so
f7262000-f7263000 rwxp 00024000 08:08 25706                              /opt/lib32/lib/libm-2.11.so
f7263000-f7298000 r-xp 00000000 08:06 379366                             /home/bjoern/.maple12_32bit/bin.IBM_INTEL_LINUX/libstdc++.so.2.9
f7298000-f72a4000 rwxp 00034000 08:06 379366                             /home/bjoern/.maple12_32bit/bin.IBM_INTEL_LINUX/libstdc++.so.2.9
f72a4000-f72a7000 rwxp 00000000 00:00 0 
f72a7000-f734a000 r-xp 00000000 08:06 379311                             /home/bjoern/.maple12_32bit/bin.IBM_INTEL_LINUX/libmclient-maplew.so
f734a000-f7350000 rwxp 000a2000 08:06 379311                             /home/bjoern/.maple12_32bit/bin.IBM_INTEL_LINUX/libmclient-maplew.so
f7350000-f7355000 rwxp 00000000 00:00 0 
f7355000-f7357000 r-xp 00000000 08:08 24411                              /opt/lib32/lib/libdl-2.11.so
f7357000-f7358000 r-xp 00001000 08:08 24411                              /opt/lib32/lib/libdl-2.11.so
f7358000-f7359000 rwxp 00002000 08:08 24411                              /opt/lib32/lib/libdl-2.11.so
f7359000-f735a000 rwxp 00000000 00:00 0 
f735a000-f736e000 r-xp 00000000 08:08 24985                              /opt/lib32/usr/lib/libICE.so.6.3.0
f736e000-f7370000 rwxp 00013000 08:08 24985                              /opt/lib32/usr/lib/libICE.so.6.3.0
f7370000-f7371000 rwxp 00000000 00:00 0 
f7371000-f7378000 r-xp 00000000 08:08 24810                              /opt/lib32/usr/lib/libSM.so.6.0.1
f7378000-f7379000 rwxp 00006000 08:08 24810                              /opt/lib32/usr/lib/libSM.so.6.0.1
f7379000-f7386000 r-xp 00000000 08:08 24938                              /opt/lib32/usr/lib/libXext.so.6.4.0
f7386000-f7387000 rwxp 0000d000 08:08 24938                              /opt/lib32/usr/lib/libXext.so.6.4.0
f7387000-f749d000 r-xp 00000000 08:08 24921                              /opt/lib32/usr/lib/libX11.so.6.3.0/home/bjoern/.maple12_32bit/bin/maple: Zeile 411:  2837 Abgebrochen             '/home/bjoern/.maple12_32bit/bin.IBM_INTEL_LINUX/maplew'

I have no idea, how to solve this...

@fsckd:
Same problem with my installation...

Offline

#16 2010-01-16 00:36:56

geo909
Member
Registered: 2008-09-07
Posts: 309

Re: Maple 12 and JVM

Hi,

Sorry for resurrecting this, but just in case somebody needs a solution.
I had problems running maple with tiling window managers. I don't know if it is the same.
In my case giving

export AWT_TOOLKIT=MToolkit

in the terminal before running xmaple would do the job.
If it works I would put this line in the script found in:

/your/maple/installation/directory/bin/xmaple

before the line that says "export MAPLE" or something like that.
Hope that helps somebody..

Last edited by geo909 (2010-01-16 00:37:24)

Offline

#17 2011-03-16 19:50:53

lustikus
Member
Registered: 2009-11-10
Posts: 262

Re: Maple 12 and JVM

is there already a new solution to this problem?
I just installed maple14 and have the exact same white window problem. I use awesome WM as well.

Offline

#18 2011-03-31 15:43:53

M_ller
Member
Registered: 2010-04-17
Posts: 80
Website

Re: Maple 12 and JVM

lustikus wrote:

is there already a new solution to this problem?
I just installed maple14 and have the exact same white window problem. I use awesome WM as well.

To fix it, I've made this edit in ~/maple/bin/xmaple

#!/bin/sh

# Copyright (c) 1993-2009 by Maplesoft, a division of Waterloo Maple Inc.
# All rights reserved. Unauthorized duplication prohibited.
# Permission is granted to modify this file to be appropriate
# for use at the installation for which Maple was purchased.

# This script runs Maple with the Java interface.
MAPLE='THIS WILL BE YOUR DESTINATION'
export MAPLE 
#the edit i've made
export AWT_TOOLKIT=MToolkit

"${MAPLE}/bin/maple" -x $*

Last edited by M_ller (2011-03-31 16:59:00)

Offline

Board footer

Powered by FluxBB