Is there an easy way to incorporate a java applet in an ASP.NET page? -
i have java applet include in asp.net page. applet works on regular old html page. when try include applet in asp.net page however, java appears start (it shows java logo , spinny blue circle), exception occurs main class:
load: class com.myclass.main.class not found. java.lang.classnotfoundexception: com.myclass.main.class
i putting applet in page following code -
<applet code="com.xyz.main.class" width="500" height="500" archive="myjar.jar" > <param name="aparam" value="somevalue"/> </applet>
note, same tag use put applet plain html page. i'm guessing reason class not found exception when asp compiles page puts somewhere else? if so, where? note still have not deployed page web server, it's running locally on development machine.
why not specify absolute uri/oath applet codebase attribute? way not have worry vagaries of relative pathing of different systems.
also see here longer explanation. excerpt:
specifying applet directory
by default, browser looks applet's class , archive files in same directory html file has tag. (if applet's class in package, browser uses package name construct directory path underneath html file's directory.) sometimes, however, it's useful put applet's files somewhere else. can use codebase attribute tell browser in directory applet's files located:
<applet code=appletsubclass.class codebase=aurl width=anint height=anint> </applet>
if aurl relative url, it's interpreted relative html document's location. making aurl absolute url, can load applet anywhere -- event http server.
Comments
Post a Comment