Nifty Issue: NoClassDefFoundError: org/jglfont/spi/BitmapFontRenderer

If I use the old Nifty constructor, it works fine. If I use the new batched renderer/constructor, I get:

Uncaught exception thrown in thread[LWJGL Renderer Thread,5,main]
NoClassDefFoundError: org/jglfont/spi/BitmapFontRenderer

public Nifty nifty;
public NiftyJmeDisplay niftyDisplay;
private MainMenuController myMainMenuController;

public void simpleInitApp()

myMainMenuController = new MainMenuController();
niftyDisplay = new NiftyJmeDisplay(assetManager, inputManager, audioRenderer, guiViewPort, 2040, 2040); // this line gives the error
nifty = niftyDisplay.getNifty();
nifty.fromXml(“Interface/MainMenuXML.xml”, “start”, myMainMenuController);

But if I use:

[java]myMainMenuController = new MainMenuController();
niftyDisplay = new NiftyJmeDisplay(assetManager, inputManager, audioRenderer, guiViewPort);
nifty = niftyDisplay.getNifty();
nifty.fromXml(“Interface/MainMenuXML.xml”, “start”, myMainMenuController);[/java]

It works.

I spent a good hour Googling this and found one post where someone resolved their own problem before anyone could reply, so I have absolutely no idea what this is or what to do about it.

But the old constructor/renderer works (almost) fine. (I wanted the new one for the text color encoding feature, which doesn’t work with the old one.) But because the old one works, I’m assuming that the issue has nothing to do with my XML or the controller.

Any ideas?

If there’s an “edit post” button, I don’t see it. EDIT: Okay, so I see it on THIS post, but not the original.

Ignore the [java][/java] tags in the code, I was trying to make that line stand out. I do not have HTML tags in my Java source code. :stuck_out_tongue:

And also, if it matters at all, the log also refers to the error as “java.lang.ClassNotFoundException: org.jglfont.spi.BitmapFontRenderer”