[aklug] Re: Java Question - Jin

From: Marc Grober <marc@interak.com>
Date: Tue Mar 31 2009 - 18:49:38 AKDT

You need to set your environment to source the correct
files.... This can often be a headache.... You have a PATH
that provides locations for your OS to look for java, and it
is picking the first it is coming across... which
apparently is not the one you want....
So you can use the full path to the executable in the
script, change your PATH, etc (myriad number of ways to
point your app at the correct files....

Christopher Howard wrote:
> Hi. I'm trying to get Jin (Java chess client) to run. It won't run because
> it needs to be using Sun Java instead of the GNU java implementation. I
> installed Sun Java 6 jre, but the program doesn't seem to know that.
>
> Here is the script that starts the program:
>
> ######
>
> #!/bin/sh
>
> # Java command
> JAVA_CMD=java
>
> # Check if GCJ
> $JAVA_CMD -version 2>&1 | grep -i -q "gcj\|gnu\|gij"
> if [ $? -eq 0 ]
> then
> echo "You seem to be running GNU's Java implementation, which is
> incomplete."
> echo "Jin requires Sun's Java (or a fully compatible version) 1.4
> or later."
> echo "If you can't install it with your distribution's package
> manager, you"
> echo "can obtain and install it manually from http://www.java.com"
> exit
> fi
>
> # Follow links
> filename=`readlink -f $0`
> if [ -z "$filename" ]
> then
> filename=$0
> fi
>
> # Change to Jin's directory - Jin needs to be run from its directory
> cd `dirname $filename`
>
> # Run Jin
> $JAVA_CMD $JAVA_OPTS -jar jin.jar $*
>
> ######
>
> I commented out the part which checks the Java version, but then the
> program just starts but crashes immediately. How can I adjust this so that
> it uses Sun Java?
>

-- Binary/unsupported file stripped by Ecartis --
-- Type: application/x-pkcs7-signature
-- File: smime.p7s
-- Desc: S/MIME Cryptographic Signature

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Tue Mar 31 18:49:46 2009

This archive was generated by hypermail 2.1.8 : Tue Mar 31 2009 - 18:49:46 AKDT