AWTPanelsContext Doesn't Extract Natives

I’ve been using the AWTPanel as my display component. In order to use it, you have to set a custom renderer.


Unfortunately, setting this as the renderer doesn’t trigger the extracting of the native libs. The jm3 Natives code looks like:

[java] public static void extractNativeLibs(Platform platform, AppSettings settings) throws IOException {
String renderer = settings.getRenderer();
String audioRenderer = settings.getAudioRenderer();
boolean needLWJGL = false;
boolean needOAL = false;
boolean needJInput = false;
boolean needNativeBullet = isUsingNativeBullet();

    if (renderer != null) {
        if (renderer.startsWith("LWJGL")) {
            needLWJGL = true;


When using AwtPanelsContext.class as the renderer, the renderer string is CUSTOMcom.jme3.system.awt.AwtPanelsContext, so needLWJGL stays false, and the lwjgl natives are not unpacked. I can work around this, but I thought the devs might want to know.



You look for something like this maybee? = new CompileApplication();;;
		// dirty dirty!
		while (! {
			try {
			} catch (final InterruptedException e) {
		this.jcan = (JmeCanvasContext);
		final Canvas canvas = this.jcan.getCanvas();
		final Dimension dim = new Dimension(768, 768); //eg my resolutin used in the embedded screen?
		this.add(canvas, constraints);

The canvas is a java.awt.Canvas so it should work or?

Or is there another reason why you need the panel and cannot use the native lwjgl one?

Thanks. I’ve tried using that and had some issues. See this thread

Ah I see, thats why you use that panel. Yes, seems like a bug then that they are not extracted, thought they were both doing the same :slight_smile: