Discussion:
[Jxplorer-users] contributiion ::: Problems with jxplorer.sh
Richard Gomes
16 years ago
Permalink
Hi,

I've done some changes in jxplorer.sh in order to:

1. Run it easily from any directory, doesnt matter where JXplorer is installed:

basename=`basename $0`
dirname=`dirname $0`
cd ${dirname}
dirname=`pwd`

....

# OPTJX=/opt/jxplorer
OPTJX=${dirname}


2. allow application start options to be easily changed and commented out because -Xdock:... was not working for some reason and I wasnt willing to invest too much time to discover why.

# java options
# JXOPTS=-Xdock:name="JXplorer"
JXDEFS=-Dcom.apple.macos.useScreenMenuBar=true

.....

$JAVAV $JXOPTS $JXDEFS -cp blah blah blah


Thanks


Richard Gomes
http://www.jquantlib.org/index.php/User:RichardGomes
Chris Betts
16 years ago
Permalink
Hi Richard,

sounds good!

The Xdock thing is Mac OSX specific - do you have any idea how we can
check for OSX in a shell script and include it if appropriate?

- Chris
...
Douglas E. Engert
16 years ago
Permalink
Post by Chris Betts
Hi Richard,
sounds good!
The Xdock thing is Mac OSX specific - do you have any idea how we can
check for OSX in a shell script and include it if appropriate?
The uname command on *EVERY* unix system will return the OS.
I believe Mac will returns Darwin.


case `uname` in
Darwin)
JXOPTS="$JXOPTS -Xdock:name="JXplorer"
;;
# Add other specific OS options here
esac
...
--
Douglas E. Engert <***@anl.gov>
Argonne National Laboratory
9700 South Cass Avenue
Argonne, Illinois 60439
(630) 252-5444
Chris Betts
16 years ago
Permalink
Hi Guys,

I had a crack at this following your suggestions, and the following
seems to work nicely on my mac. Does it work o.k. on other systems?

JXOPTS=""
case $(uname) in
Darwin*)
JXOPTS="-Xdock:name=\"JXplorer\" -Dcom.apple.macos.useScreenMenuBar=true"

echo "running OSX version";;
esac

- Chris

P.S. Richard, I'm not sure how to use your suggestion; I've sort of stuck it
in but it doesn't seem to do anything. I'm afraid I'm pretty clueless with
shell scripts...

Loading...