Applet support

What are the current plans to integrate jME3 into Applets? I strongly prefer jME3 for multiple reasons (memory management, resource streaming, HDR) and I am restricted to using an Applet for my project.

It works fine. See how it is done in jme3test.awt.TestApplet. You need to bootstrap it through LWJGL's AppletLoader to load the natives though.

My understanding is that it will be there if it isn't already – its based on the lwjgl applet loader that will allow any jME3 app to be launched as an applet so long as the app can run within the sandbox restrictions… so just write as though for desktop, then package it with the applet loader. I plan to release my app as an applet if I can pack everything down into what the sandbox will allow.

I'm not too worried about loading the natives right now as all the testing is done via NetBeans' AppletViewer.



I went through some of the source for the TestApplet and much of it seems hardcoded; settings.setWidth(640); for example. That's why I was curious as to whether this was going to be implemented–seeing as how it's just in test format as far as I can tell. (I figured that it would eventually move on from being a test.)



The problem with writing it "as though for desktop" is that one is implemented through the main class and another extends the Applet class. I think I will just do as you suggested and use the TestApplet as a template to set up the drawing canvas.



Thank you both!

Actually as long as your program extends the Application class you should be load it as an applet quite easily. Any specific logic that is in the main() method will have to be implemented separately for the applet though.

I noticed there's another class there called AppHarness, its designed to wrap an Application as an Applet. So you use LWJGL AppletLoader to load AppHarness, and you specify the AppClass to be the class in your program that extends Application. The AppHarness will then load the class you specify and run it inside the applet.

Hmm, that's kind of interesting. I wouldn't think that would actually work, but I guess the application and applet loading processes are actually very similar. I'll definitely check that out. Thanks again.