java - 从 html 调用小程序

标签 java html netbeans applet

我正在开发一个项目,需要从 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/

相关文章:

java - 将java项目导入eclipse

java - 基于 Luna 构建的 Eclipse RCP 应用程序有时会错过 Windows 10 上的 bundle

html - Flex - 图像约束

javascript - 如何在小部件框中隐藏某些类?

html - 版权、注册商标、商标和服务商标实体定位

java - 安卓/ Gradle : how to find the good mix of Google dependencies versions?

Java根据条件查找重复项并覆盖/更新重复对象中的部分数据

jpa - 无法通过 Junit 初始化 Netbeans 中的 EntityManager

java - 有什么方法可以让 Netbeans 在 Maven 项目中编译和保存类吗?

css - NetBeans jqGrid CSS 问题