How can I put the JPC applet on my website?

Its easy. Just borrow this HTML and download the JPCApplet jar file, and use Sun's deployJava script like this:

   <script type="text/javascript" src="http://java.com/js/deployJava.js"></script>
   <script type="text/javascript">

    deployJava.setInstallerType('online');
    if (deployJava.versionCheck('1.5+'))
    {
       var attributes = {id:'JPC',
       code:'org.jpc.j2se.JPCApplet.class',
       archive:'jars/JPCApplet.jar, jars/classes.jar, jars/monkeyclasses.jar',
       boot: 'fda',
       fda: 'demos/floppy.zip',
       hda: 'demos/dosgames.zip',
       ss: 'demos/BOOT-dosgames-keen.zip',
       preloadJars: '',
       width:'775', height:'620'};
       var parameters = {java_arguments:'-Xmx300m', separate_jvm:
      'true', draggable: 'true', mayscript: 'true', boot: 'fda', fda: 'demos/floppy.zip', hda: 'demos/dosgames.zip', ss: 'demos/BOOT-dosgames-keen.zip', preloadJars: ''};
       deployJava.runApplet(attributes, parameters, '1.5');
    } else {
       document.write("You need to update your browser's Java");
       deployJava.installLatestJRE();
    }
   </script>

Then to include your own hard drive image, all you have to do is change the value in the "hda" parameter to match your disk image. The disk image can be inside a jar file with the same name as the image, but with a .jar extension, or it can be uncompressed on the web server and either downloaded or accessed remotely (read only). You can also precompile classes using the JPC Application relevant to your applet, and include them in the class path for speedy execution in an unsigned applet.

Please also credit us with at least a link back here. Something like,

Powered by JPC, the fast 100% Java PC emulator

And remember that if you haven't precompiled classes, signed applets will run faster.

How do I precompile classes?

First load up the JPCApplication with all the right drives attached and possibly with your snapshot loaded. Then, whilst the PC is still paused, click "start saving classes" in the snapshot menu, and click the play button. When you have run the PC for long enough, pause the PC, and click "finish saving compiled classes" in the snapshot menu. Then your classes will be saved into the file "classes.jar" in the same directory as the JPCApplication.jar file you ran from. Due to a bug, there's one more thing you need to do, which is run the classes.jar through a class verifier. We've included one in the source distribution (ClassVerifer.java). The result is then stored in "outclasses.jar". This can then be included in the classpath of your applet to greatly speed execution.