I have made a GUI in Java using State Based Game, as it extends StateBasedGame
and not JApplet
its not a true applet, I want to put it on a website and am unsure on how to do this, I have been told that the following code allows me to make this into an applet using html and not having to edit the Java code:
<applet code="org.lwjgl.util.applet.AppletLoader"
archive="org.lwjgl.util.applet.AppletLoader"
codebase="."
width="640" height="480">
<param name="al_title" value="Ham Blaster">
<param name="al_main" value="org.newdawn.slick.AppletGameContainer">
<param name="game" value="org.javagame.Game">
<param name="al_jars" value="racegame.jar, lwjgl.jar, slick.jar">
<param name="al_windows" value="windows_natives.jar">
<param name="al_linux" value="linux_natives.jar">
<param name="al_mac" value="macosx_natives.jar">
<param name="separate_jvm" value="true">
</applet>
When I run the html code I get the following error on the centre of my screen:
An error occurred while loading the applet. Please contact support to resolve this issue. missing required applet parameter: al_main.
I have looked inside slick for the ApplerGameContainer
but I can only find chrome files, I tried putting these in the same directory as the html file but I still get the same error.
If something seems very simple and may seem too obvious to ask me, please tell me because I am new to Java, my previous error with this code was because I did not have my html and lwjgl_util_applet.jar in the same directory, so please tell me anything that may help me.