problems with inner classes

AI discussion, ideas, and SDK help.
Post Reply
inonzuk
Luxer
Posts: 20
Joined: Thu Apr 19, 2007 7:36 am

problems with inner classes

Post by inonzuk » Mon Jan 14, 2008 4:14 am

Hi guys,

I wrote a robot who which extends SmartAgentBase and he contains an inner class. When debugging and running it via the Ecplise IDE everything works great.

However, when trying to run the robot not via the IDE by straight through the Lux application I get an error which I suspect is related to the inner class
"java.lang.NoClassDefFoundError: com/sillysoft/lux/agent/MixedAgent$Action"

I have two files: the "MixedAgent.class" is my robot and the "MixedAgent$Action.class" is the inner class.

Any ideas on why I get this problem and how to solve it ? Can a robot be composed of more than one class file ?

Thanks in advance
Inon

User avatar
Bertrand
Reaper Creator
Posts: 568
Joined: Mon Nov 28, 2005 4:35 pm
Location: Montreal

Re: problems with inner classes

Post by Bertrand » Mon Jan 14, 2008 6:54 am

inonzuk wrote:Any ideas on why I get this problem and how to solve it ? Can a robot be composed of more than one class file ?
Yes. In your Agents folder, create the directory structure com/sillysoft/lux/agent/ and copy your class file to Agents/com/sillysoft/lux/agent/MixedAgent$Action.class

User avatar
Sophrosyne
Luxer
Posts: 18
Joined: Fri Nov 12, 2010 1:45 pm
Location: Birmingham, London

Post by Sophrosyne » Sun Dec 12, 2010 8:59 am

Ah genious, I was just having the same problem. Cheers Bertrand!

Post Reply

Who is online

Users browsing this forum: No registered users and 21 guests