• Hi, everyone — I’m crying “uncle” on this one. I’ve been trying to embed a crossword applet made with MagnumOpus (https://www.crauswords.com/) on a Page in WordPress with no luck at all, and I don’t know what to tweak next.

    I’ve pared the code down to the barest minimum:

    <applet code="crossword.class" archive="crossword.jar" width=640 height=470>
    <param name="puzzle1"  value="christmas-carols-1.crossword">
    </applet>

    It works here, as a raw html page: https://rchseaglesnest.org/java/puzzle.html

    But not here, in the WordPress framework: https://rchseaglesnest.org/christmas-song-crossword/

    I’m not sure where WordPress would be expecting to find the .jar file—I have copies of it (and the .class and .crossword files) in my original /java directory, in my /public_html root, and in my operative theme folder, just to see if they would pick it up from one of those.

    I’ve also tried various permutations of things like codebase=”https://rchseaglesnest.org/java/&#8221; and archive=”https://rchseaglesnest.org/java/crossword.jar&#8221; etc. etc. with no luck.

    Does anybody have a clue what might be happening? Should this even work at all? Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • You have to use absolute (full) urls in WordPress.

    Thread Starter Jeff

    (@jmf)

    I’ve tried this, most recently:

    <applet code="https://rchseaglesnest.org/java/crossword.class" archive="https://rchseaglesnest.org/java/crossword.jar" width=640 height=470>
    <param name="puzzle1" value="https://rchseaglesnest.org/java/christmas-carols-1.crossword">
    </applet>

    and other combinations of the same. I’ve tried both an absolute and relative path to the christmas-carols-1.crossword file (the data file); I’d assume that one would be relative, since the applet itself probably expects to find the data file in the same directory…

    Firefox seems to kick out some kind of ‘applet not loaded’ error, so I guess it’s still not finding anything, somehow?

    Have you tried using the object tag instead of the (now deprecated) applet tag?

    Thread Starter Jeff

    (@jmf)

    I have tried the object tag, I think, in various forms, as well. After trying seemingly simpler solutions/snippets, my latest attempt looks like this:

    <!-- latest JRE -->
    <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="640" height="470">
      <PARAM name="archive" value="https://rchseaglesnest.org/java/crossword.jar">
      <PARAM name="code" value="archive="https://rchseaglesnest.org/java/crossword.class">
      <PARAM name="puzzle1" value="christmas-carols-1.crossword">
    </OBJECT>
    
    <!-- JRE 1.5.0 only -->
    <OBJECT classid="clsid:CAFEEFAC-0015-0000-0000-ABCDEFFEDCBA" width="640" height="470">
      <PARAM name="archive" value="https://rchseaglesnest.org/java/crossword.jar">
      <PARAM name="code" value="archive="https://rchseaglesnest.org/java/crossword.class">
      <PARAM name="puzzle1" value="christmas-carols-1.crossword">
    </OBJECT>
    
    <!-- latest JRE but no earlier than 1.5.0 -->
    <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="640" height="470" codebase="https://java.sun.com/products/plugin/autodl/jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0">
      <PARAM name="archive" value="https://rchseaglesnest.org/java/crossword.jar">
      <PARAM name="code" value="archive="https://rchseaglesnest.org/java/crossword.class">
      <PARAM name="puzzle1" value="christmas-carols-1.crossword">
    </object>

    And no luck. Needless to say, I feel like I’m just flailing wildly at this point, and I don’t even know if WordPress should be able to pick up the paths correctly, anyway. Working with the “black box” of an exported .jar and .class file doesn’t help, either, because I’ve got no way of knowing what they expect.

    I’ve just tried viewing the applet in the original HTML page and it’s not working in Firefox or IE8!

    Thread Starter Jeff

    (@jmf)

    My fault—I had stripped out some of the (extensive) <PARAM> tags from puzzle.html in order to find the bare minimum I needed to work with. I was mostly interested in just getting the darned applet to load, at this point!

    I’m trying to add a applet to a post or a page on my blog.

    But after i have writen the code in the HTML view and I click update, all the text just disappear.

    this si the applet

    <APPLET name=”test” code=”HelloSindre.class” archive=”Test.jar” width=”200″ height=”500″ codebase=”https://sites.google.com/site/sindreng/home/progammer/”><param name=”_cx” value=”2646″></param></APPLET>

    Do anyone know what I’m doing wrong, or why this happens?

    I have just released a Java Applet plugin. This will solve the problems of <applet> tags disappearing on you.

    Come get the goodies:
    https://www.ads-software.com/extend/plugins/java-applet-embed/

    By the way, my understanding is that, while the <applet> tag may be deprecated in favor of <object>, Oracle (Sun (Javasoft)) still recommends the use of <applet> for the most consistent and bug-free behavior from browsers.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Add applet to WordPress Page’ is closed to new replies.