Jason, On 8/21/07, Robertson, Jason V <[EMAIL PROTECTED]> wrote: > Hi Patrick, > > Thanks, I gave that a try but it's still erroring out on me. I'm sure it's > user error on my part, but I can't see anything obvious. I was wrong, by the > way - it's not an enum it's just a static field. >
Here's what you need (there was a missing $ sigil): org::apache::log4j::Logger->getRootLogger()->setLevel($org::apache::log4j::Level::OFF); Patrick > # Above gives: > #Can't convert org::apache::log4j::Level::OFF to object > org.apache.log4j.Level at /tmp/plib/lib/Inline/Java/Object.pm line 107 > org::apache::log4j::Logger->getRootLogger()->setLevel(org::apache::log4j::Level->{OFF}); > # Above gives: > #log4j:ERROR You have tried to set a null level to root. > > -----Original Message----- > From: Patrick LeBoutillier [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 21, 2007 7:15 AM > To: Robertson, Jason V > Cc: inline@perl.org > Subject: Re: Java enum support.. > > Hi, > > On 8/20/07, Robertson, Jason V <[EMAIL PROTECTED]> wrote: > > Is there a way to access Java enums from Inline::Java? I tried the > > obvious, e.g. > > > > > > > > org::apache::log4j::Level->{OFF} > > > > and > > > > org::apache::log4j::Level->OFF > > Try this: > > org::apache::log4j::Level::OFF > > (see http://search.cpan.org/~patl/Inline-Java-0.52/Java.pod#MEMBER_VARIABLES > for more details) > > > Patrick > > > > > > > > Neither seems to work... > > > > > > > > Thanks, > > > > Jason > > > > > > > -- > ===================== > Patrick LeBoutillier > Laval, Québec, Canada > -- ===================== Patrick LeBoutillier Laval, Québec, Canada