run applets with appletviewer
Hello,
I磎 starting to work with applets and I have some probelms when I try to run them. I have written my applets with Eclipse and I have no problems to run them inside the IDE but when I export the project in a JAR file I can磘 run it. I have tried to run de jar file with the appletviewer. When I do this, a console appears for a second and then it vanished. I have tried to place my applet in a html page but it did't work.
Thank you in anticipation for your help!
> I have tried to run de jar file with the appletviewer.
> place my applet in a html page but it did't work.
Well, my best guess is that you did something wrong. Since you give us
no info on what the command looks like you gave to run the appletViewer
nor did you post any of the html code that is the best all of us can do.
Applet tag in html should look something like this:
<object
classid = "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
codebase = "http://java.sun.com/update/1.5.0/jinstall-1_5-windows-i586.cab"
>
<PARAM NAME = CODE VALUE = "MyApplet" >
<PARAM NAME = CODEBASE VALUE = "../RelativeDirOneDirHigherThanTheHtmlPage/" >
<PARAM NAME = ARCHIVE VALUE = "MyJarFile.jar, AnyOtherJarFile.jar" >
<param name = "type" value = "application/x-java-applet;">
<param name = "scriptable" value = "true">
<comment>
<embed
type = "application/x-java-applet" \
CODE = "MyApplet" \
JAVA_CODEBASE = "../RelativeDirOneDirHigherThanTheHtmlPage/" \
ARCHIVE = "MyJarFile.jar, AnyOtherJarFile.jar"
scriptable = true
pluginspage = "http://java.sun.com/products/plugin/index.html#download">
<noembed>
</noembed>
</embed>
</comment>
</object>
Message was edited by:
harmmeijer