On Wed, Nov 26, 2008 at 11:00 AM, Ittay Dror <[EMAIL PROTECTED]> wrote: > > > Assaf Arkin wrote: > >> On Wed, Nov 26, 2008 at 10:42 AM, Ittay Dror <[EMAIL PROTECTED]> wrote: >> >>> >>> what if i need to load a jar (created) during the build ? >>> >> >> Your extension can create a class loader and load whatever it needs. >> > > which is the second part of my question. do you recommend any particular way > of doing that? i can create a url classloader through rjb , then add the > jar to it, then ask it for the class i want, but it looks like too verbose. > on the other hand, if i want to write a utility class to do that for me, > then i need to compile it and then java is already loaded and doesn't know > about it.
If you only need to compile these files once, one option is to run javac on them, the other is to pre-compile. We pre-compile all the Java classes that ship with Buildr. Assaf >> >> Assaf >> >> >>> >>> Assaf Arkin wrote: >>> >>>> >>>> On Tue, Nov 25, 2008 at 9:23 PM, Ittay Dror <[EMAIL PROTECTED]> >>>> wrote: >>>> >>>> >>>>> >>>>> Hi, >>>>> >>>>> >>>>> Is there a way of adding a jar to the Java classpath, after it is >>>>> already >>>>> loaded, so that I can then use its classes? If not, what is the proper >>>>> way >>>>> of adding java code that an extension can then use? >>>>> >>>>> >>>> >>>> The JVM is only loaded during the build, so extensions can add JARs to >>>> the classpath if they need to: >>>> http://incubator.apache.org/buildr/more_stuff.html#using_java_libraries >>>> >>>> Assaf >>>> >>>> >>>> >>>>> >>>>> Thanks, >>>>> >>>>> Ittay >>>>> >>>>> >>>>> -- >>>>> -- >>>>> Ittay Dror <[EMAIL PROTECTED]> >>>>> >>>>> >>>>> >>>>> >>>> >>>> >>> >>> -- >>> Ittay Dror <[EMAIL PROTECTED]> >>> Tikal <http://www.tikalk.com> >>> Tikal Project <http://tikal.sourceforge.net> >>> >>> >>> >> >> > > -- > Ittay Dror <[EMAIL PROTECTED]> > Tikal <http://www.tikalk.com> > Tikal Project <http://tikal.sourceforge.net> > >
