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.
-- cut here
use Inline (Java => 'STUDY', AUTOSTUDY => 1,
STUDY => [
'org.apache.log4j.BasicConfigurator',
'org.apache.log4j.Logger',
'org.apache.log4j.Level',
]
);
# This next line works
org::apache::log4j::BasicConfigurator->configure();
#org::apache::log4j::Logger->getRootLogger()->setLevel(org::apache::log4j::Level::OFF);
# 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: [email protected]
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