buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rhett Sutphin <>
Subject Re: Accessing unconventionally-capitalized java classes from buildr
Date Tue, 03 Mar 2009 17:54:33 GMT

On Mar 2, 2009, at 3:04 PM, Daniel Spiewak wrote:

> I think that you're going to have to do an RJB import.  If you were  
> using JRuby, you would need to use an unconventional syntax there as  
> well since they make the same assumption.

Thanks for the verification.

In case anyone else is trying to work with bnd:  I did get the command  
line invocation to work using  
RJB.import("aQute.bnd.main.bnd").main(args).  However, it turns out  
that bnd's command line interface does System.exit (even on success),  
so I switched to using the ant tasks instead.


> Daniel
> On Mar 2, 2009, at 2:24 PM, Rhett Sutphin  
> <> wrote:
>> Hi,
>> I'm trying to invoke the command-line version of bnd (

>> ) from buildr.  The utility has a main class (aQute.bnd.main.bnd)  
>> which I'm trying to invoke in buildr like so:
>> Java.aQute.bnd.main.bnd.main(args)
>> I get the error "No arguments expected" for this.  Tracing into the  
>> code, this seems to come from java/rjb.rb, which assumes that the  
>> class name starts with a capital letter and so is treating the  
>> whole thing as a series of packages.
>> This is a reasonable assumption IMO, but I'm wondering if there's a  
>> workaround for loading a class which doesn't fit it.  Do I need to  
>> just do Rjb.import?  Or is there an rjb/jruby cross-compatible  
>> syntax that I'm missing?
>> Thanks,
>> Rhett

View raw message