Hi
I can run successfully LWJGL applet on my system, as a proof
NinjaCave Applet found here
and here is the screenshot
so it clearly shows that i can run any LWJGL enables applet on my computer.
JME3 INSIDE Applet RUN Directly Within ECLIPSE
Libraries Included,
appletlibs/lwjgl.jar.pack.lzma, appletlibs/jinput.jar.pack.lzma, appletlibs/obf-mmgdesigner-v1.jar, appletlibs/Signed_AbsoluteLayout.jar, appletlibs/Signed_batik-cutdown.jar, appletlibs/Signed_jME3-core.jar, appletlibs/Signed_jME3-desktop.jar, appletlibs/Signed_jME3-lwjgl.jar, appletlibs/Signed_swing-layout-1.0.3.jar, appletlibs/Signed_joal.jar, appletlibs/Signed_j-ogg-oggd.jarJME3 Canvas Creation and Manipulation Code ============================================================== [java] public static void createCanvas(String appClass) {
AppSettings settings = new AppSettings(true);
settings.setWidth(1024);
settings.setHeight(768);
settings.setSamples(4);
settings.setBitsPerPixel(24);
settings.setRenderer(AppSettings.LWJGL_OPENGL_ANY);
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.setPauseOnLostFocus(true);
app.setSettings(settings);
app.createCanvas();
context = (JmeCanvasContext) app.getContext();
context.setSystemListener(app);
canvas = context.getCanvas();
canvas.setSize(settings.getWidth(), settings.getHeight());
}[/java]
Start Application method which inserts panel runtime in to Current JPanel
[java]public void startApp() {
GroupLayout layout = new GroupLayout(previewPanel);
previewPanel.setLayout(layout);
layout.setAutoCreateContainerGaps(true);
layout.setAutoCreateGaps(true);
layout.setHorizontalGroup(layout.createSequentialGroup().addComponent(
canvas));
layout.setVerticalGroup(layout.createParallelGroup().addComponent(
canvas));
System.out.println(" Starting Canvas ");
app.startCanvas();
System.out.println(" Canvas Started ");
app.enqueue(new Callable<Void>() {
public Void call() {
if (app instanceof SimpleApplication) {
SimpleApplication simpleApp = (SimpleApplication) app;
simpleApp.getFlyByCamera().setDragToRotate(true);
simpleApp.getInputManager().setCursorVisible(true);
validate();
}
return null;
}
});
}[/java]
and the actual method which calls these two methods
[java] createCanvas(jme3AppClass);
startApp();
app.setPauseOnLostFocus(false);
System.out.println("container:init");[/java]
I am running an JApplet then from the Eclipse Run Applet Command
Eclipse Console Output
<span style=“text-decoration:underline;”>JME3 Applet Screenshot From Eclipse </span>
Now i pack the current Project in Jar , Obfuscate and sign it everything get done successfully.
Following are my Applet Parameters
[java]var attributes = {
code:‘org.lwjgl.util.applet.AppletLoader.class’,
codebase:‘.’,
archive : ‘appletlibs/Signed_obf-lwjgl_applet_util.jar,appletlibs/lzma.jar’,
width : 812,
height : 654
};
var parameters = {
SESSION_ID:‘<%= sessionId%>’,
fontSize : 16,
FILEUPLOAD_SERVLET : ‘…/servlet/FileUploadServlet’,
al_title:“MonogeniusShoeDesigner” ,
al_main:“com.mmg.app.gui1.MmgDesignerContainer”,
al_jars:“appletlibs/lwjgl.jar.pack.lzma, appletlibs/jinput.jar.pack.lzma, appletlibs/Signed_obf-mmgdesigner-v1.jar,appletlibs/Signed_AbsoluteLayout.jar,appletlibs/Signed_batik-cutdown.jar,appletlibs/Signed_jME3-core.jar,appletlibs/Signed_jME3-desktop.jar,appletlibs/Signed_jME3-lwjgl.jar,appletlibs/Signed_swing-layout-1.0.3.jar,appletlibs/Signed_joal.jar,appletlibs/Signed_j-ogg-oggd.jar,appletlibs/Signed_jME3-plugins.jar” ,
al_windows:“appletlibs/natives/Signed_windows_natives.jar” ,
al_linux:“appletlibs/natives/linux_natives.jar.lzma” ,
al_mac:“appletlibs/natives/macosx_natives.jar.lzma” ,
al_solaris:“natives/solaris_natives.jar.lzma”,
boxbgcolor:“#000000” ,
boxfgcolor:“#ffffff” ,
al_logo:“appletlibs/shoe_design.gif”,
al_progressbar:“appletlibs/ajax-loader.gif”,
al_debug:“true”,
separate_jvm:“true”,
image:‘appletlibs/ajax-loader.gif’,
centerimage:‘true’
};
var version = ‘1.6’; // whichever minimum version you want to target, null works also
deployJava.runApplet(attributes, parameters, version);[/java]
When the Applet runs on my computer it does everything normal and execute successfully, i checked in My temp folder there are all the needed jars including natives exist.
JME3 Applet When Runs inside Browser - Java Console Panel
JME3 Applet When Runs inside Browser Screenshot
so what did i make wrong ? i can not see anything in my applet.
<span style=“text-decoration:underline;”>I have few Questions here,</span>
(1) Why the canvas does not display as expected ?
(2) There are some differences i highlighted by drawing box on them specially the Browser Java Console , why is the difference because same code is running on the same computer ?
(3) If you look at the browser Java Console you will see that the camera is created 4 times , Why ?
(4) In my simpleinitapp method at the last i put the line
[java] System.out.println(" --> Application Started .......");[/java]
and you can see in the browser Java Console that this line is printed , it means that the method is called and executed successfully ,
still there is nothing on the screen, Why ?
(5) there is no error/ exception stack trace on the browser java console as you can see , what is happening ? anything freezes there ?
I hope i will get answer this time.
Thanks