"Colin Sampaleanu" <cas / exis.com> writes:

> > The implementation of JAR files is one of the many evils of
> > Java. Every time I get a new Java application, I have to add its JAR
> > file to my classpath. THis rapidly becomes unmanageable.
> 
> ... what you are typically supposed to do is start java (the vm)
> and specify a classpath specific to that application. This can be done in a
> relative fashion. So if I have an app with JARed libs in /lib, and some raw
> .class files starting in /classes, I can have a batch file (supplied with
> the app) in the root of the app structure which can start the app, with the
> following contents:
> ----
> java -cp lib/whatever.jar;somethingelse.jar;etc.jar;classes
> com.whatever.package.structure.StartClass
> ----

All true, but... with a typical application, I'm bringing in classes
from all over the place. In the Java world, for example, I may need to 
bring in six Visibroker JAR files, a couple of Oracle JDBC ones, and a 
few of my own. And this is for _every_ application. And because these
various vendors don't know about each other, it's up to _me_ to link
these things together.

Contrast that to the current Ruby way (which isn't perfect, but)...

- I install the packages I need.
- I run the application.

No messing with wrappers, no going through a bunch of files changing paths.


The problem with JAR files is you can't just slap them in a directory
and have Java find them: you have to nominate each one.

Now, there's an intermediate step I _could_ support. It there was a
library called (say) 'rdparse', and this library had a library
structure something like:

   rdparse/parser.rb
   rdparse/token.rb
   rdparse/token/unicode.rb
   rdparse/lex.rb

then I would be convenient to be able to package all these together in 
a single archive, say 'rdparse.rlb'. When Ruby searches for libraries, 
it could assume that within a file called 'xxx.rlb' it could resolve
requests to load xxx/..., and therefore open it automatically. This
would cut down on the number of files installed by an application, but 
at the same time would avoid having to list each archive file
explicitly whenever you run an application.


Regards


Dave



Footnotes: 
 On my Unix boxes, I run all my installed software based from a
directory tree that my user owns, so I have /tc/usr/bin, /tc/usr/lib
and so on. I never install software as root, so installation is always 
fairly painless.