dsj - applet use     
  

humatic - htools - dsj
htools RSS feed

Those who have fought with it will know, that trying to run native code in an applet can be a less funny undertaking. While not generally rocket science, it takes a lot of steps, a lot of fiddling with paths, a lot of clashes with security restrictions and many such hurdles more until one might finally see the browser load and run the applet.
In order to ease this process, we have packed up the handling of as many of those stepping stones as possible in a little helper library and hope this can help running dsj applications in applets. However, the library just makes things a lot easier, it is not required in any way

The dsjAppletHelper
  • downloads and installs the dsj binaries w/ version check, serving 64bit dlls to 64bit browsers
  • can install and register additional DirectShow filters
  • may run external exe files / installers
  • helps with javascript interaction between the applet and the webpage
The helper lib is minimal in size (~15k) and most easy to deploy. It takes exactly one line of code at the entry of your applet to get rid of everything related to class and library paths:

   new dsjAppletHelper().prepareAppletEnvironment(this, new java.net.URL(getCodeBase(), "setup.xml"));

Additional installs are configureable via the xml document passed in as an argument to the above function. Here is an example:


What the library can not do is get you around security restrictions. An applet that wants to use native code must be signed. Luckily most IDEs today help with code signing. For more manual use we provide a sample batch script with the library. General information on java code signing can be found in Sun's tutorial on the matter here: java.sun.com/docs/books/tutorial/security/toolsign

dsjAppletHelper is a commercial library. Unlicensed versions are fully functional, but will show demo mode dialogs.

download dsjAppletHelper library
dsj applet demo


humatic - htools - dsj