home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / JBuilder8.iso / Solaris / resource / jre / man / sman1 / appletviewer.1 next >
Encoding:
Text File  |  2002-09-06  |  14.6 KB  |  193 lines

  1. <!DOCTYPE REFENTRY PUBLIC "-//Sun Microsystems//DTD DocBook V3.0-Based SolBook Subset V2.0//EN" [
  2. <!--ArborText, Inc., 1988-1999, v.4002-->
  3. <!ENTITY % javaents SYSTEM "javaman.ent">
  4. %javaents;
  5. ]>
  6. <?Pub UDT _bookmark _target>
  7. <?Pub Inc>
  8. <refentry id="appletviewer-1">
  9. <!-- @(#)appletviewer.1 1.12 01/03/14 SMI; -->
  10. <refmeta><refentrytitle>appletviewer</refentrytitle><manvolnum>1</manvolnum>
  11. <refmiscinfo class="date">23 Apr 2001</refmiscinfo>
  12. <refmiscinfo class="sectdesc">&man1;</refmiscinfo>
  13. <refmiscinfo class="software">&java-release;</refmiscinfo>
  14. <refmiscinfo class="arch">generic</refmiscinfo>
  15. <refmiscinfo class="copyright"> Copyright 2001 Sun Microsystems, Inc. All rights reserved.  Copyright 2001 Sun Microsystems, Inc. Tous droits réservés.  </refmiscinfo>
  16. </refmeta>
  17. <refnamediv><refname>appletviewer</refname><refpurpose>Java applet viewer</refpurpose></refnamediv>
  18. <refsynopsisdiv><title>&synp-tt;</title>
  19. <cmdsynopsis><command>appletviewer</command><arg choice="opt"><option>debug</option></arg><arg choice="opt"><option>encoding</option> <replaceable>encoding_name</replaceable></arg><arg choice="opt"><option>J</option> <replaceable>javaoption</replaceable></arg><arg choice="plain" rep="repeat"><replaceable>urls</replaceable></arg>
  20. </cmdsynopsis></refsynopsisdiv>
  21. <refsect1><title>&desc-tt;</title>
  22. <indexterm id="appletviewer-1-indx-1"><primary sortas="appletviewer">appletviewer — run applets</primary></indexterm><indexterm id="appletviewer-1-indx-2"><primary sortas="appletviewer">appletviewer — Web browser</primary></indexterm><para>The <command>appletviewer</command> command runs Java™ applets outside of the context of a World Wide Web browser.</para>
  23. <para>The <command>appletviewer</command> command connects to the document(s) or resource(s) designated by <replaceable>urls</replaceable> and displays each applet referenced by that document in its own window. Notice that if the documents referred to by <replaceable>urls</replaceable> do not reference any applets with the <literal>OBJECT</literal>, <literal>EMBED</literal>, or <literal remap="small and bold">
  24. APPLET</literal> tag, <command>appletviewer</command> does nothing.</para>
  25. <refsect2><title>appletviewer Tags</title>
  26. <para>The <command>appletviewer</command> makes it possible to run a Java applet without using a browser. <command>appletviewer</command> ignores any <acronym remap="small">HTML</acronym> that is not  immediately relevant to launching an applet. However, it recognizes a wide variety of  applet-launching syntax. The <acronym remap="small">HTML</acronym> code that appletviewer recognizes is shown below.
  27. All other <acronym remap="small">HTML</acronym> code is ignored.</para>
  28. <variablelist termlength="narrow"><varlistentry><term remap="10"><literal>object</literal> </term><listitem><para>The <literal>object</literal> tag is the <acronym remap="small">HTML</acronym> 4.0 tag for embedding applets and mult-media objects into an <acronym remap="small">HTML</acronym> page. It is also an Internet Explorer 4.x extension to <acronym remap="small">HTML</acronym> 3.2 which allows <acronym>
  29. IE</acronym> to run a Java applet using the latest Java plugin from Sun.<informalexample><screen> <object
  30.    width="pixelWidth"
  31.    height="pixelHeight"
  32.  >
  33.    <param name="code" value="yourClass.class">
  34.    <param name="object" value="serializedObjectOrJavaBean">
  35.    <param name="codebase" value="classFileDirectory">
  36.    ...
  37.    alternate-text
  38. </object></screen>
  39. </informalexample></para>
  40. <para>Please notice that:</para>
  41. <itemizedlist>
  42. <listitem><para><command>appletviewer</command> ignores the "classID" attribute, on the assumption that it is pointing to the Java plugin, with the value:<informalexample><para><screen>classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"</screen></para>
  43. </informalexample></para>
  44. </listitem>
  45. <listitem><para><command>appletviewer</command> also ignores the "codebase" attribute that is usually included as part of the  <literal>object</literal> tag, assuming that it points to a Java plugin in a network cab file with a value like:<informalexample><para><screen>codebase="http://java.sun.com/products/plugin/1.1/\
  46.         jinstall-11-win32.cab#Version=1,1,0,0"</screen></para>
  47. </informalexample></para>
  48. </listitem>
  49. <listitem><para>The optional codebase <literal>param</literal> tag supplies a relative <acronym>URL</acronym> that specifies the location of the applet class.</para>
  50. </listitem>
  51. <listitem><para>Either <literal>code</literal> or <literal>object</literal> is specified, not both.</para>
  52. </listitem>
  53. <listitem><para>The type <literal>param</literal> tag is not used by  <command>appletviewer</command>, but should be present so that browsers load the plugin properly. For an applet, the value should be something like:<informalexample><para><screen>  <param name="type"
  54.   value="application/x-java-applet;version=1.1"></screen></para>
  55. <para>or</para>
  56. <para><screen>  <param name="type" value="application/x-java-applet"></screen></para>
  57. <para>For a serialized object or JavaBean, the type <literal>param</literal> value should be something like:</para>
  58. <para><screen>  <param name="type"
  59.    value="application/x-java-bean;version=1.1"></screen></para>
  60. <para>or</para>
  61. <para><screen>  <param name="type" value="application/x-java-bean"></screen></para>
  62. </informalexample></para>
  63. </listitem>
  64. <listitem><para>Other <literal>param</literal> tags are argument values supplied to the applet.</para>
  65. </listitem>
  66. <listitem><para>The <literal>object</literal> tag recognized by IE4.x and the embed tag recognized by Netscape 4.x can be combined so that an applet can use the latest Java plugin from Sun, regardless of the browser that downloads the applet.</para>
  67. </listitem>
  68. <listitem><para><command>appletviewer</command> does not recognize the <literal>java_code</literal>, <literal>java_codebase</literal>, <literal>java_object</literal>, or <literal>java_type</literal> <literal>param</literal> tags. These tags are only needed when the applet defines parameters with the names <literal>code</literal>, <literal>codebase</literal>, <literal>object</literal>, or <literal>type
  69. </literal>, respectively. (In that situation, the plugin recognizes and uses the <literal>java_</literal> version in preference to the version that will be used by the applet.)  If the applet requires a parameter with one of these four names, it may not run in <command>appletviewer</command>.</para>
  70. </listitem>
  71. </itemizedlist>
  72. </listitem></varlistentry>
  73. <varlistentry><term remap="10"><literal>embed</literal> </term><listitem><para>The <literal>embed</literal> tag is the Netscape extension to <acronym remap="small">HTML</acronym> 3.2 that allows embedding an applet or a multimedia object in an <acronym remap="small">HTML</acronym> page. It allows a Netscape 4.x browser (which supports <acronym remap="small">HTML</acronym> 3.2) to run a Java applet using
  74. the latest Java plugin from Sun.<informalexample><screen>  <embed
  75.     code="yourClass.class"
  76.     object="serializedObjectOrJavaBean"
  77.     codebase="classFileDirectory"
  78.     width="pixelWidth"
  79.     height="pixelHeight"
  80.   >
  81.   ...
  82.   </embed>
  83.  
  84. </screen>
  85. </informalexample></para>
  86. <para>Please notice that:</para>
  87. <itemizedlist>
  88. <listitem><para>The <literal>object</literal> and <literal>embed</literal> tags can be combined so that an applet can use the latest Java plugin from Sun, regardless of the browser that downloads the applet. For more information, see the Java PlugIn <acronym remap="small">HTML</acronym> Specification</para>
  89. </listitem>
  90. <listitem><para>Unlike the <literal>object</literal> tag, all values specified in an <literal>embed</literal> tag are attributes (part of the tag) rather than parameters (between the <literal>start</literal> tag and <literal>end</literal> tag, specified with a <literal>param</literal> tag.</para>
  91. </listitem>
  92. <listitem><para>To supply argument values for applet parameters, you add additional attributes to the <literal>embed</literal> tag.</para>
  93. </listitem>
  94. <listitem><para><command>appletviewer</command> ignores the "src" attribute that is usually part of an <literal>embed</literal> tag.</para>
  95. </listitem>
  96. <listitem><para>Either <literal>code</literal> or  <literal>object</literal> is specified, not both.</para>
  97. </listitem>
  98. <listitem><para>The optional <literal>codebase</literal> attribute supplies a relative <acronym>URL</acronym> that specifies the location of the applet class.</para>
  99. </listitem>
  100. <listitem><para>The <literal>type</literal> attribute is not used by  <command>appletviewer</command>, but should be present so that browsers load the plugin properly. For an applet, the value should be something like:<informalexample><screen>  <type="application/x-java-applet;version=1.1">...</screen>
  101. <para>or</para>
  102. <screen>  <type="application/x-java-applet">...</screen>
  103. </informalexample> </para>
  104. <para>For a serialized object or JavaBean, the type param value should be something like:<informalexample><screen>  <type="application/x-java-bean;version=1.1">...</screen>
  105. <para>or</para>
  106. <screen>  <type="application/x-java-bean">...</screen>
  107. </informalexample></para>
  108. </listitem>
  109. </itemizedlist>
  110. <itemizedlist>
  111. <listitem><para>The <literal>pluginspage</literal> attribute is not used by <command>appletviewer</command>, but should be present so that browsers load the plugin properly. It should point to a Java plugin in a network cab file with a value like:<informalexample><screen>pluginspage="http://java.sun.com/products/plugin/1.1/\
  112.            jinstall-11-win32.cab#Version=1,1,0,0"</screen>
  113. </informalexample></para>
  114. </listitem>
  115. </itemizedlist>
  116. </listitem></varlistentry>
  117. <varlistentry><term remap="10"><literal>applet</literal> </term><listitem><para>The <literal>applet</literal> tag is the original <acronym remap="small">HTML</acronym> 3.2 tag for embedding an applet in an <acronym remap="small">HTML</acronym> page. Applets loaded using the <literal>applet</literal> tag are run by the browser, which may not be using the latest version of the Java platform. To ensure
  118. that the applet runs with the latest version, use the  <literal>object</literal> tag to load the Java plugin into the browser. The plugin will then run the applet.<informalexample><screen>  <applet
  119.     code="yourClass.class"
  120.     object="serializedObjectOrJavaBean"
  121.     codebase="classFileDirectory"
  122.     width="pixelWidth"
  123.     height="pixelHeight"
  124.   >
  125.     <param name="..." value="...">
  126.     ...
  127.     alternate-text
  128.   </applet>
  129.  
  130. </screen>
  131. </informalexample></para>
  132. <para>Please notice that:</para>
  133. <itemizedlist>
  134. <listitem><para>Either  <literal>code</literal> or <literal>object</literal> is specified, not both.</para>
  135. </listitem>
  136. <listitem><para>The optional <literal>codebase</literal> attribute supplies a relative <acronym>URL</acronym> that specifies the location of the applet class.</para>
  137. </listitem>
  138. <listitem><para><literal>param</literal> tags supply argument values for applet parameters.</para>
  139. </listitem>
  140. </itemizedlist>
  141. </listitem></varlistentry>
  142. <varlistentry><term remap="10"><literal>app</literal> </term><listitem><para>The  <literal>app</literal> tag was a short-lived abbreviation for applet that is no longer supported. <command>appletviewer</command> translates the tag and prints out an equivalent tag that is supported.<informalexample><screen>  <app
  143.     class="classFileName" (without a .class suffix)
  144.     src="classFileDirectory"
  145.     width="pixelWidth"
  146.     height="pixelHeight"
  147.   >
  148.     <param name="..." value="...">
  149.     ...
  150.   </app></screen>
  151. </informalexample></para>
  152. </listitem></varlistentry>
  153. </variablelist></refsect2>
  154. </refsect1>
  155. <refsect1><title>&opts-tt;</title>
  156. <para>The following options are supported:</para>
  157. <variablelist termlength="medium"><varlistentry><term remap="10"><option>debug</option> </term><listitem><para>Starts the applet viewer in the Java debugger, which debugs applets in the document. (See <link linkend="jdb-1"><citerefentry><refentrytitle>jdb</refentrytitle><manvolnum>1</manvolnum></citerefentry></link>.)</para>
  158. </listitem></varlistentry>
  159. <varlistentry><term remap="10"><option>encoding</option> <replaceable>encoding_name</replaceable> </term><listitem><para>Specifies the input <acronym remap="small">HTML</acronym> file encoding name.</para>
  160. </listitem></varlistentry>
  161. <varlistentry><term remap="10"><option>J</option> <replaceable>javaoption</replaceable> </term><listitem><para>Passes the string <replaceable>javaoption</replaceable> through as a single argument to <link linkend="java-1"><citerefentry><refentrytitle>java</refentrytitle><manvolnum>1</manvolnum></citerefentry></link> which runs the compiler. The argument should not contain spaces. Multiple argument words
  162. must all begin with the prefix <option>J</option>, which is stripped. This is useful for adjusting the execution environment or compiler memory usage.</para>
  163. </listitem></varlistentry>
  164. </variablelist></refsect1>
  165. <refsect1><title>&attr-tt;</title>
  166. <para>See <olink targetdocent="REFMAN5" localinfo="attributes-5"><citerefentry><refentrytitle>attributes</refentrytitle><manvolnum>5</manvolnum></citerefentry></olink> for a description of the following attributes:</para>
  167. <informaltable frame="all" orient="port">
  168. <tgroup cols="2" colsep="1" rowsep="1"><colspec colnum="1" colname="col1" colwidth="1*" colsep="1" align="left"><colspec colnum="2" colname="col2" colwidth="1*" align="left">
  169. <thead>
  170. <row><entry colname="col1" rowsep="1" align="center" valign="top">ATTRIBUTE TYPE</entry><entry colname="col2" rowsep="1" align="center" valign="top">ATTRIBUTE VALUE</entry></row>
  171. </thead>
  172. <tbody>
  173. <row><entry>Availability</entry><entry>SUNWj3dev</entry></row>
  174. </tbody>
  175. </tgroup>
  176. </informaltable>
  177. </refsect1>
  178. <refsect1><title>&also-tt;</title>
  179. <para><link linkend="java-1"><citerefentry><refentrytitle>java</refentrytitle><manvolnum>1</manvolnum></citerefentry></link>, <link linkend="jdb-1"><citerefentry><refentrytitle>jdb</refentrytitle><manvolnum>1</manvolnum></citerefentry></link>, <olink targetdocent="REFMAN5" localinfo="attributes-5"><citerefentry><refentrytitle>attributes</refentrytitle><manvolnum>5</manvolnum></citerefentry></olink> 
  180. </para>
  181. <para>For more information, see <informalexample><para><ulink url="http://java.sun.com/j2se/1.4/docs/guide/plugin/developer_guide/index.html">http://java.sun.com/j2se/1.4/docs/guide/plugin/developer_guide/index.html</ulink></para>
  182. </informalexample></para>
  183. <para>or search <informalexample><para><ulink url="java.sun.com">java.sun.com</ulink></para>
  184. </informalexample><?Pub Caret> for <literal>Java Plug-In HTML Specification</literal>.</para>
  185. </refsect1>
  186. <!--+ 07/27/00 08:32:55
  187.     | tagMorph:  $Id: tagMorph-engine 1.54 1998/01/19 05:44:48 $
  188.     | tagMorph library:  $Id: libtagMorph.a 1.50 1998/01/19 22:02:51 $
  189.     | sunman-to-solbook 1.17
  190.     +-->
  191. </refentry>
  192. <?Pub *0000014911 0>
  193.