• Home
  • Blog
  • Brain Games
    • Three Door Dilemma
      • Three Door Dilemma Explanation
    • Confusing Colors
    • Folded Paper Dilemma
    • Memory for Pennies
Browse: Home / Blog

Adding Processing Applets to Wordpress Pages and Posts

It can be tricky to add Processing applets to WordPress pages and posts. Here’s one method that works for me:

  1. Assume you have an Processing program called MyProgram.
  2. In the Processing environment, create an applet by clicking on File…Export. This will put five files in a folder called “applet” in your MyProgram folder. The two key files created are MyProgram.jar and MyProgram.java
  3. Copy all five files to a folder on your hosting web server. Put them in a folder called MyProgramFolder on the server. If you put this new folder in the root folder of your server, then the path to this folder will be /MyProgramFolder (the path will be different if you call it something else or if you put this folder in some other folder on your server).
  4. Now create a new page or post in WordPress.
  5. Switch to the HTML tab, so you can enter some HTML code in your page or post.
  6. Copy and paste the following code to your new WordPress page or post:
    <applet codebase="/MyProgramFolder" archive="MyProgram.jar" code="MyProgram.class" width=480 height=360 MAYSCRIPT> <param name="ARCHIVE" value="MyProgram.jar"> </applet>
  7. Be sure NOT to add any “line breaks” to this line. It should be all on one line, except that it will wrap to the next if you screen is not wide enough.
  8. Preview or Publish your page/post. Your applet should now run.

I have successfully tested this on the most current versions of Chrome, Firefox, and Internet Explorer. Of course, Java needs to be enabled on your browser.

Posted in Processing, WordPress | Tagged applet, tutorial | Leave a response

Topics

  • Processing
  • WordPress

Tags

applet tutorial

Archives

  • February 2010
Gary Muhonen gary@dcity.org