[kepler-dev] what's the deal with org.kepler.loader.InitClassPath?

David Welker david.v.welker at gmail.com
Wed Oct 29 12:37:23 PDT 2008

Ah, so your the one that did it! =) =)

As far as Ant goes, ant.jar is only 1.3 MBs and all the other jars
associated with Ant including ant.jar are less than 2 MBs in total. So,
there really doesn't seem like there is any reason to avoid shipping the ant
libraries if the code from those libraries turns out to be useful. We
certainly have quite a few jars that exceed 1.3 MBs in size, includ
batik-all-1.6.jar at 2.5 MB, icu4j.jar at 2.3 MB, jena.jar at 2.5 MB and so

I agree that one would not want to distribute ant, the command-line tool
with Kepler. But, there doesn't seem any reason not to distribute ant.jar
the library with Kepler just as you would any other library that was useful.

Dynamic class loading, as I believe is done in InitClassPath is the way to
go for lazy loading. But, it was also used to load up all the jars,
including those probably more appropriately handled by the build system. In
any case, this isn't really a bad solution, given the problems you had at
the time. But now, with multiple modules, there just is no longer any way
for this approach to be accommodated.

Anyway, you really love Kepler! If I was retired, I am not sure I would be
here chatting on this list. Talk about dedication! =)

On Wed, Oct 29, 2008 at 12:21 PM, Dan Higgins <higgins at nceas.ucsb.edu>wrote:

> Hi David and Tristan,
>   I am the culprit that initiated the InitClassPath idea (before I retired
> from NCEAS last Feb). It was far from an ideal solution (but a vast
> improvement over trying to keep a list of more than 100 jars up-to-date all
> the time).  Note that using ant was NOT considered a good idea at the time
> because we did not want to ship ant with Kepler, many novice users (not
> developers!) did not know what ant is, did not want to install it, and did
> not know how to use it. I encourage efforts to improve classpath handling
> but do suggest that developers try to hide the details from potential
> ordinary users.
> Dan Higgins
> NCEAS - (retired)
> David Welker wrote:
>> Hi Tristan,
>> I agree with you that this InitClassPath idea was probably not a good one.
>> I know you have your own Maven build going on... but I should point out that
>> in the loader module used with the new build system, InitClassPath is no
>> longer used. If you are so inclined, you might want to check out the new
>> build system, especially the 1.1 branch. It is, in my opinion, a vast
>> improvement over the previous build system. (Note: I am, of course, biased,
>> since I have been the person who has primarily developed the new build
>> system.) But, perhaps more importantly from your perspective, InitClassPath
>> is not used, so this problem you are having will no longer exist. As you
>> suggest, in the new build system, I use ant to manage the class path, and it
>> does the job.
>> David
>>> Hi Tristan,
>>> I think this class is there so that the classpath can be amended to allow
>>> for different versions of the same class in different jars.  I think Dan
>>> Crawl last worked on it, so I'll let him explain more.  I think it's a bug
>>> that it finds files in the .svn directories.  They should probably be
>>> explicitly excluded from the search as we will never want anything in those
>>> directories in the classpath.
>>> We have plans to overhaul this system sometime in the next year when we
>>> start re-architecting the core of kepler.
>>> As for including all of jython in kepler, I don't have a problem with
>>> that as long as it isn't 20 MB of jar files or something huge like that.
>>>  We're in the process of breaking kepler up into modules which will be built
>>> by a single build system.  A Jython module would probably be a nice addition
>>> to kepler.  I'm hoping to have the new directory structure for the modules
>>> sorted out in the next week or so and I'm almost at a point where I can
>>> check in the changes that I've made to split the core of kepler away from
>>> other functionality.  Needless to say, there are some pretty large changes
>>> coming to Kepler in the next couple weeks. You might want to wait just a bit
>>> until we get this new system in place before adding Jython.  We'll make an
>>> announcement to the community when everything is ready to go.
>>> thanks,
>>> chad
>>> Tristan King wrote:
>>>> I've been messing around with kepler's jython support recently trying to
>>>> get kepler to use my system's jython install rather than the jython.jar
>>>> included with kepler and run into an interesting problem.
>>>> The InitClassPath class recursively goes through the lib/jar/ directory
>>>> and adds anything it finds to the classpath. This includes the
>>>> .svn/**/*.jar.svn-base files. Thus, even if i overwrite the
>>>> lib/jar/jython.jar file, the lib/jar/.svn/prop-base/jython.jar.svn-base file
>>>> is found and added to the classpath, and since . comes before j, the .svn/
>>>> version of jython.jar takes precedence in the classpath. I haven't tested
>>>> this, but assume that this would effect any other files in the lib/jar/
>>>> directory. If you try and update a library, you wont be able to test it
>>>> until you check the file into svn, which overwrites the stored .svn version
>>>> of the file.
>>>> Is there any advantage to the InitClassPath class other than removing
>>>> the need to write out the classpath manually in release builds? Because I
>>>> can't see one, and I don't think the aforementioned reason is a good reason
>>>> for trying to build something that ant provides already, and does right!
>>>> --
>>>> Tristan King
>>>> Research Officer,
>>>> eResearch Centre
>>>> James Cook University, Townsville Qld 4811
>>>> Australia
>>>> Phone: +61747816902
>>>> E-mail: tristan.king at jcu.edu.au <mailto:tristan.king at jcu.edu.au> www:
>>>> http://eresearch.jcu.edu.au
>>>> ------------------------------------------------------------------------
>>>> _______________________________________________
>>>> Kepler-dev mailing list
>>>> Kepler-dev at ecoinformatics.org
>>>> http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-dev
>>> _______________________________________________
>>> Kepler-dev mailing list
>>> Kepler-dev at ecoinformatics.org
>>> http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-dev
>> _______________________________________________
>> Kepler-dev mailing list
>> Kepler-dev at ecoinformatics.org
>> http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercury.nceas.ucsb.edu/ecoinformatics/pipermail/kepler-dev/attachments/20081029/d7acb4e4/attachment-0001.html>

More information about the Kepler-dev mailing list