On Tue, 24 Nov 1998 [EMAIL PROTECTED] wrote:

> Having it "fixed" in 1.2 won't help us, as Jikes is designed to run with
> all but most ancient JDK's. You supply the classes.zip (or jar, or
> whatever), we provide the bytecode. Sigh.

I imagine you'll think of a switch such as +1.2 to give it 1.2 behaviour.
If you decide to use a jikesrc file, can we please start a nw conventiion?
my home dir's getting litterd with .*rc files. Let's start putting them in
~/.etc - if the directory exists, use it. If it doesn't and there's no
existing config file, make it.

Now my contribution to the CLASSPATH problem. I drop all my java stuff into
/usr/java. I thought of scanning from there for *.jar and *.zip but
discovered most of the zips are source, so gave scanning for them.

I decided doing it every time's not so bright either as it's not especially
quick and doesn't change all that often, even though I'm a bit of a
software junkie. Besiddes, I don't generally want demo jars in my
classpath.. So I scan as needed (with the find command) to create a list of
jars.

In /etc/profile.d I have
drwxr-xr-x   2 root     root         1024 Oct 21 20:37 .
drwxr-xr-x  22 root     root         3072 Nov 25 15:20 ..
-rw-r--r--   1 root     root         2499 Oct 21 20:34 java
-rwxr-xr-x   1 root     root          485 May 17  1998 jdk.csh
-rwxr-xr-x   1 root     root          775 Oct 21 20:37 jdk.sh

"java" contains a list of my jars, created with a find command then editted
to remvoe the obvious junk.

Here's how I use it:
[summer@possum profile.d]$ cat jdk.sh | grep -v ^#
if [ -z "${JAVA_HOME}" ] ; then
        export JAVA_HOME=/usr/lib/jdk-1.1.6
fi
if [ -z "${JDK_HOME}" ] ; then
        export JDK_HOME=/usr/lib/jdk-1.1.6
fi
SW=`cat /etc/profile.d/java`
SW=`echo ${SW}  | sed -e "s/ /:/g"`
MYPATH="${JDK_HOME}/lib/classes.zip:${SW}"
        export CLASSPATH="${MYPATH}"
MYPATH="${JDK_HOME}/bin/"
echo ":${PATH}:"| grep "${MYPATH}" >/dev/null ||\
                   PATH="${PATH}:${MYPATH}"

export PATH



For those who haven't twigged, in a convoluted sequence of events, bash
gets to run /etc/profile.d/*.sh (and csh runs /etc/profile.d/*.csh) during
login processing. This is on RedHat - it may work a little differently on
other distributions.

I have to do it a little differently on OS/2 which can't cope with the
commandline size needed to set all these jars at once.

Here's the find command to locate the jars. The list will need some
tweaking to weed out demos and any other junk.
find /usr/java -name *.jar 


Cheers
John Summerfield
http://os2.ami.com.au/os2/ for OS/2 support.
Configuration, networking, combined IBM ftpsites index.

Reply via email to