How to embed a Java Applet from another website (can't link their class file and jar)

江枫思渺然 提交于 2019-12-24 19:03:13

问题


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. 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? If this is possible, it would be the best and easiest way.


回答1:


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.



来源:https://stackoverflow.com/questions/3416490/how-to-embed-a-java-applet-from-another-website-cant-link-their-class-file-and

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!