Re: The evils of /usr/share/java/repository
On Wed, Sep 19, 2001 at 03:35:20AM +0200, Anders Jackson wrote:
> Jeff Turner <email@example.com> 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
# do nothing, or something very minimal
> 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,
So if I don't want anything, I put in my ~/.cp_remove:
To only remove jaxp, I'd put:
And if I have a directory of jars I frequently use (~/jars), I could put this in
Not sure how this could be implemented in /bin/sh though.