Hello,
I have this message in my java console
10 avr. 2011 23:55:25 com.jme3.system.JmeSystem initialize
INFO: Running on jMonkey Engine 3 Alpha 0.6
10 avr. 2011 23:55:25 com.jme3.system.lwjgl.LwjglCanvas$1 addNotify
INFO: EDT: Creating OGL thread.
applet:init
applet:start
Exception in thread “LWJGL Renderer Thread” java.lang.UnsatisfiedLinkError: org.lwjgl.DefaultSysImplementation.getPointerSize()I
at org.lwjgl.DefaultSysImplementation.getPointerSize(Native Method)
at org.lwjgl.Sys.(Sys.java:100)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:192)
at java.lang.Thread.run(Unknown Source)
Thank you
Are you creating your applet through jMP?
No I use eclipse and this code
[java]
public class TestApplet extends Applet
{
private static JmeCanvasContext context;
private static Application app;
private static Canvas canvas;
private static TestApplet applet;
public TestApplet()
{
}
public static void createCanvas(String appClass)
{
AppSettings settings = new AppSettings(true);
settings.setWidth(640);
settings.setHeight(480);
// settings.setRenderer(AppSettings.JOGL);
JmeSystem.setLowPermissions(true);
try{
Class<? extends Application> clazz = (Class<? extends Application>) Class.forName(appClass);
app = clazz.newInstance();
}catch (ClassNotFoundException ex){
ex.printStackTrace();
}catch (InstantiationException ex){
ex.printStackTrace();
}catch (IllegalAccessException ex){
ex.printStackTrace();
}
app.setSettings(settings);
app.createCanvas();
context = (JmeCanvasContext) app.getContext();
canvas = context.getCanvas();
canvas.setSize(settings.getWidth(), settings.getHeight());
}
public static void startApp()
{
applet.add(canvas);
app.startCanvas();
app.enqueue(new Callable<Void>()
{
public Void call()
{
if (app instanceof SimpleApplication)
{
SimpleApplication simpleApp = (SimpleApplication) app;
simpleApp.getFlyByCamera().setDragToRotate(true);
simpleApp.getInputManager().setCursorVisible(true);
}
return null;
}
});
}
public void freezeApp(){
remove(canvas);
}
public void unfreezeApp(){
add(canvas);
}
@Override
public final void update(Graphics g) {
// canvas.setSize(getWidth(), getHeight());
}
@Override
public void init(){
applet = this;
createCanvas(“HelloJME3”);// my class
startApp();
app.setPauseOnLostFocus(false);
System.out.println(“applet:init”);
}
@Override
public void start(){
// context.setAutoFlushFrames(true);
System.out.println(“applet:start”);
}
@Override
public void stop(){
// context.setAutoFlushFrames(false);
System.out.println(“applet:stop”);
}
@Override
public void destroy(){
SwingUtilities.invokeLater(new Runnable(){
public void run(){
removeAll();
System.out.println(“applet:destroyStart”);
}
});
app.stop(true);
System.out.println(“applet:destroyEnd”);
}
}
[/java]
I have in my html file this jar
jMonkeyEngine3.jar
my_jar.jar
lwjgl.jar
windows_natives.jar
lwjgl_util_applet.jar
jME3-lwjgl-natives.jar
It’s ok?
I am afraid its not going to work.
The primary issue with jME applet deployment is handling the native libraries, jME3 uses a library called LWJGL to handle hardware accelerated 3D rendering. To use native libraries in an applet, they must be extracted from the JAR file and then loaded, this also requires system access permissions. All of this is handled through a special utility applet called LWJGL AppletLoader.
This is why jMP comes with this feature built-in and is as easy as ticking a single checkbox to enable it. If you still would like to keep using Eclipse, you can do so, but to deploy as an applet you will need to open jMP to build the project.
Ok thank you momoko Fan