On Sun, 8 Jul 2001, Edward Avis cum veritate scripsit :

> I have my .bashrc set up to do this automatically for every file in a
> certain directory.  It would be possible to add a new script in
> /etc/profile.d/ to do this.

I install 3rd party jars in a shared directory (NFS) and change/add my
CLASSPATH in my .bashrc.
Due to development with developer jars with rapidly changing API's we use
different versions of different packages and adjust our CLASSPATHs to make
sure that the software and its API's will harmonize.

But the guy at home with his freshly blown away windoze system and his
shiny new Linux Mandrake System there must be a solution for click-
and-run.

> Sun sometimes recommend that you install new .jar files in
> /usr/java/jre/lib/ or /usr/java/jre/lib/ext/.  Then they get picked up
> automatically without needing to be in the CLASSPATH.  But I think this
> is not really appropriate for stuff that doesn't come from Sun, and I'm
> not sure that /usr/java/ is a good place for anything, although Sun seem
> to have claimed it.

Why not? I guess that a symlink from /usr/java to a better place should
also work.
Which JDKs and JRE do actually behave like you described???

> One guy has packaged lots of Java stuff for Red Hat's contrib section,
> for example
> <http://www.rpmfind.net/linux/RPM/solaris//RPMS/i386//Acme-1.0-2.noarch.html>.
> This installs a tree of .class files under /usr/share/Acme/ and adds two
> new scripts to /etc/profile.d/ to add this directory to the CLASSPATH.
> Personally, I think that having every package add a new script to
> profile.d/ is messy.  Better to have a single one and have it
> automatically pick up things installed under some specified directory.

Agreement.

> So is there a Mandrake policy or precedent for this stuff?  Do any other
> distributions have a policy we could copy?
>
> If not, I propose that Java libraries be installed under
> /usr/share/java/, either as .jar files or as subdirectories full of

Agreement but what says the Linux Standard Base?
I would prefer this directory /usr/share/java/ and a symlink to it from
/usr/java. And in /usr/share/java/ there should be the jre/lib dirs you
mentioned above.

> .class files.  And /etc/profile.d/java should do something like:
>
> for i in /usr/share/java/*; do
>     export CLASSPATH=$CLASSPATH:$i
> done

Hmmm... doesn't look bad!
But... maybe there will be (with a /huge/ growing number of jars etc.)
some broken dependencies or conflicts due to the wrong sequence of jars in
CLASSPATH.
E.g.: You install a package which needs i.e. the new JMF 2.1.1 and
comes with it. For /this/ software the new jmf jar must be prepended to
the old classpath. If the installer and/or /etc/profile does it right then
the new software will run, but /old/ software which needs the old JMF 1.x
won't run anymore.
(I know that you can't deliver JMF due to license but it's only an
example.)
How does you think about that?

And what about a *big* CLASSPATH if you have installed dozens of java
packages?


Frank

--
In C we had to code our own bugs. In C++ we can inherit them.

Sending unsolicited commercial email to this address may be a violation
of the Washington State Consumer Protection Act, chapter 19.86 RCW.
Das Verschicken unverlangter kommerzieller email an diese Adresse ist
verboten (LG Traunstein, 2 HK O 3755/97 vom 14.10.1997, CR 1998, 171f).
Frank Meurer <[EMAIL PROTECTED]>, PGP ID: 0x5E756DA8
Key fingerprint = 169A 1138 8DB4 528F 2F01  20A6 EDD8 49C3 5E75 6DA8



Reply via email to