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

查看:136
本文介绍了如何从其他网站嵌入Java小程序(无法链接它们的类文件和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 code和它确实表现出的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小程序(无法链接它们的类文件和jar)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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