简体   繁体   English

如何从另一个网站嵌入Java Applet(无法链接其类文件和jar)

[英]How to embed a Java Applet from another website (can't link their class file and 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'}"

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. 首先,我天真地复制了HTML代码,它确实显示了Java Applet对象,但由于显然找不到该类而无法加载它。 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. 我正在寻求他们的许可,看看我们是否可以直接从他们那里获得许可。

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? 是否可以将整个页面作为iframe嵌入并“裁剪”,以便iframe仅显示Java Applet所在的区域? If this is possible, it would be the best and easiest way. 如果可能的话,那将是最好和最简单的方法。

You certainly can download the the .jar file - they have to be accessible so that browsers can load them. 您当然可以下载.jar文件-必须访问它们,以便浏览器可以加载它们。 I'd guess you are trying to get the .class file, but it is within a .jar , so get the .jar instead. 我猜您正在尝试获取.class文件,但是它位于.jar ,因此请获取.jar

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM