Home
Categories
Dictionnary
Download
Project Details
Changes Log
Who We Are
FAQ
License

Applet


    1  Signing the jar files
    2  Example
    3  Applets limitations
    4  Browser Applet support
    5  Browser Applet support
    6  Notes

The Server in the Swing framework can be run as an Applet to be integrated in a browser.

Signing the jar files

To be able to use the Applet in a browser, you will have to sign all the Jar files used in the Server application. To achieve this, there are several tasks in the ant build:

Example

The following html page will show a Server integrated in a Web page:

      <HTML>
         <TITLE>
      Applet Example
         </TITLE>
         <BODY>
            <APPLET CODE="arinc661.server.swing.ServerApplet.class" ARCHIVE="swingServer.jar" WIDTH="500" HEIGHT="500">
               <PARAM NAME="server.config" VALUE="arinc.properties" />
            </APPLET>
         </BODY>
      </HTML>

The result will look like this in the Applet Viewer for example:



The arinc.properties configuration must point to a SuperLayer configuration, for example:

      graphics=DefGraphics.xml
      ui=LookAndFeel.xml
      pictures=DefPictures.xml
      lf=metal
      supplement=4
      serverInputPort=8080
      serverOutputPort=8081
      serverInputSize=50000
      serverOutputSize=200
      server.autoConnect=false
      windowManager=windows
      server.windows=simpleWindow.xml
      server.autoVisible=true

Applets limitations

Applets are by default executed in a much stricter security context than regular Java applications. For example:

Browser Applet support

Browser Applet support

You should note that browser support for Java Applets, and more generally for the NPAPI[6] technology which enables Web Plugins and is used by Applets, will be discontinued soon in browsers[7] [8] [9]

Notes

  1. Note that self−signed Applets are blocked by default in current Web browsers. See also Browser Applet support more generally for browser Applets support
  2. Understanding signing and verification.Oracle
  3. Signing Applets using RSA certificates.Oracle
  4. This means for example that using the Server Container Swing Offset behavior flag is mandatory to avoid using in Swing the default behavior accessing a private JComponent flag
  5. In this case, the container of the Applet
  6. or Netscape Plugin Application Programming
  7. Google Chrome discontinued support for NPAPI in 2015, Opera in May 2016, and Firefox plan to drop support for NPAPI end of 2016
  8. Moving to a Plugin free Web.Oracle. 2016−01−27
  9. Migrating from Applets to Plugin free Java technologies.Oracle. 2016−01−27

See Also


Category: server Category: swing Category: dev Category: user

Copyright 2016 Dassault Aviation. All Rights Reserved. Documentation and source under the GPL v2 licence

Project Web Hosted by SourceForge.net Copyright 1999-2010 - Geeknet, Inc., All Rights Reserved About - Legal - Help