如何从另一个网站嵌入 Java Applet(无法链接他们的类文件和 jar) [英] How to embed a Java Applet from another website (can't link their class file and jar)

查看:17
本文介绍了如何从另一个网站嵌入 Java Applet(无法链接他们的类文件和 jar)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

除了标题所说的,我还遇到了问题,因为它们的类文件链接如下:

In addition to what my title says, I am running into problems because their class file is linked as follows:

"var attributes = 
  {code:'xx/xxxx/xx/xx/xxx/xxx/xxxxx.class' 
                       width:645,height:443,archive:'xxxxx.jar'}"

首先,我天真地复制了 HTML 代码,它确实显示了一个 Java Applet 对象,但无法加载它,因为它显然没有找到类.我尝试了许多不同的地址以查看是否可以下载该类,但没有成功.这是否意味着无法下载该类?我正在征求他们的许可,看看我们是否可以直接从他们那里获得许可.

First, I naively copied the HTML code and it did show a Java Applet Object, but couldn't load it because it obviously didn't find the class. I tried many different addresses to see if I can download the class, but with no success. Does this mean the class can't be downloaded? I'm in the process of asking for their permission and see if we can get it directly from them.

我还想到了另一种方式.是否可以将整个页面作为 iframe 嵌入并裁剪"它,以便 iframe 仅显示 Java Applet 所在的区域?如果可以,这将是最好和最简单的方法.

I also thought of another way. Is it possible to embed their whole page as an iframe AND "crop" it so the iframe only displays the area where the Java Applet is located? If this is possible, it would be the best and easiest way.

推荐答案

您当然可以下载 .jar 文件 - 它们必须是可访问的,以便浏览器可以加载它们.我猜你想获取 .class 文件,但它在 .jar 中,所以获取 .jar 代替.

You certainly can download the the .jar file - they have to be accessible so that browsers can load them. I'd guess you are trying to get the .class file, but it is within a .jar, so get the .jar instead.

这篇关于如何从另一个网站嵌入 Java Applet(无法链接他们的类文件和 jar)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆