我正在开发一个项目,需要从 HTML 调用一个小程序,我正在这样做:
<applet code="AppletClient.class" width="350" height="200" </applet>
它给我一个错误,无法找到AppletClient.class
。如果我复制该文件并将其粘贴到 HTML 文件的同一位置,它就可以工作。我该如何解决这个问题?
最佳答案
" however if i copy that file and paste it in the same location of the html file it works no problem "
您已经注意到这个问题了。改正路径,就可以了。现在您正在导航到classes 文件夹。但是,请尝试删除第一个“/”。
<applet code="AppletClient.class" codebase="/classes"
width="350" height="200">
将位置放入代码库标记内。代码标签用于类名。我第一次错过了,抱歉:(
关于java - 从 html 调用小程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10640783/