On Wed, Sep 19, 2001 at 03:35:20AM +0200, Anders Jackson wrote:
> Jeff Turner <[EMAIL PROTECTED]> writes:
>
> [...]
>
> > As long as it's not purely additive. I want to be able to remove stuff
> > from the classpath, not just add my stuff. There are various subtle
> > problems that can occur otherwise:
>
> Make /usr/bin/java a modified version of your proj.sh, wher you add
> that if you set CLASSPATH, proj.sh (or /usr/bin/java) only adds system
> class-path to your CLASSPATH with stuff that is needed to run a basic
> clean Java machine. Or even doesn't add anything at all.
Do you mean something like:
if [ -z "$CLASSPATH" ]; then
for jar in /usr/share/lib/*.jar; do
export CLASSPATH=$CLASSPATH:$jar
done
else
# do nothing, or something very minimal
fi
> Then you can override system class-path.
Yep, it's a possibility, but a bit kludgey.
Maybe there could be two files, ~/.cp_add and ~/.cp_remove. Each
contains regexps of files to add to and remove from the classpath,
respectively.
So if I don't want anything, I put in my ~/.cp_remove:
*
To only remove jaxp, I'd put:
*jaxp*.jar
And if I have a directory of jars I frequently use (~/jars), I could put this in
my ~/.cp_add:
~/jars/*.jar
Not sure how this could be implemented in /bin/sh though.
--Jeff
> /Jackson
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]