📄 jar.html
字号:
Here are the server-side files you need to deploy the Enterprise
Beans. This list is taken from the original auction application described
in <A HREF="code.html">Chapter 2: Auction Application Code</A>
before any modifications were made to make the Enterprise Beans
container managed. Note the inclusion of the deployment descriptor,
and the container-generated stub and skel classes.
<H4>auction Package</H4>
Here are the application files in the <CODE>auction</CODE>
package that make up the <CODE>AuctionServlet</CODE> servlet and
<CODE>AuctionItemBean</CODE> Enterprise Bean. Because they
are all to be installed in an <CODE>auction</CODE> directory
accessible to the production Enterprise JavaBeans server, bundle
them together so they can be unpacked in one step in the
destination directory and placed in the <CODE>acution</CODE>
subdirectory..
<UL>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">auction.AuctionServlet.class</FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">auction.AuctionItem.class</FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">auction.AuctionItemBean.class</FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">auction.AuctionItemHome.class</FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">auction.AuctionItemPK.class</FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">auction.DeploymentDescriptor.txt</FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">AuctionItemBeanHomeImpl_ServiceStub.class</FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">WLStub1h1153e3h2r4x3t5w6e82e6jd412c.class</FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">WLStub364c363d622h2j1j422a4oo2gm5o.class</FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">WLSkel1h1153e3h2r4x3t5w6e82e6jd412c.class</FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">WLSkel364c363d622h2j1j422a4oo2gm5o.class</FONT>
</UL>
Here is how to bundle them. Everything goes on one line,
and the command is executed one directory above where
the class files are located.
<PRE>
<STRONG>Unix:</STRONG>
jar cvf auction.jar auction/*.class
<STRONG>Win32:</STRONG>
jar cvf auction.jar auction\*.class
</PRE>
Once the JAR file is copied to the destination directory for the
Enterprise beans, unpack it as follows. The extraction creates an
<CODE>auction</CODE> directory with the class files in it.
<PRE>
jar xv auction.jar
</PRE>
<H4>registration Package</H4>
Here are the application files in the <CODE>registration</CODE>
package that make up the <CODE>Registration</CODE> Enterprise Bean.
<UL>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">registration.Registration.class</FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">registration.RegistrationBean.class</FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">registration.RegistrationHome.class</FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">registration.RegistrationPK.class</FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">auction.DeploymentDescriptor.txt</FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">RegistrationBeanHomeImpl_ServiceStub.class</FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">WLStub183w4u1f4e70p6j1r4k6z1x3f6yc21.class</FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">WLStub4z67s6n4k3sx131y4fi6w4x616p28.class</FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">WLSkel183w4u1f4e70p6j1r4k6z1x3f6yc21.class</FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">WLSkel4z67s6n4k3sx131y4fi6w4x616p28.class</FONT>
</UL>
Here is how to bundle them. Everything goes on one line,
and the command is executed one directory above where
the class files are located.
<PRE>
<STRONG>Unix:</STRONG>
jar cvf registration.jar registration/*.class
<STRONG>Win32:</STRONG>
jar cvf registration.jar registration\*.class
</PRE>
Once the JAR file is copied to the destination directory for the
Enterprise beans,
unpack it as follows. The extraction creates a <CODE>registration</CODE>
directory with the class files in it.
<PRE>
jar xv registration.jar
</PRE>
<H4>bidder Package</H4>
Here are the application files in the <CODE>bidder</CODE>
package that make up the <CODE>Bidder</CODE> Enterprise Bean.
<UL>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">bidder.Bidder.class</FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">bidder.BidderHome.class</FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">bidder.BidderBean.class</FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">auction.DeploymentDescriptor.txt</FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">BidderBeanEOImpl_ServiceStub.class</FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">BidderBeanHomeImpl_ServiceStub.class</FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">WLStub1z35502726376oa1m4m395m4w5j1j5t.class</FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">WLStub5g4v1dm3m271tr4i5s4b4k6p376d5x.class</FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">WLSkel1z35502726376oa1m4m395m4w5j1j5t.class</FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">WLSkel5g4v1dm3m271tr4i5s4b4k6p376d5x.class</FONT>
</UL>
Here is how to bundle them. Everything goes on one line,
and the command is executed one directory above where
the class files are located.
<PRE>
<STRONG>Unix:</STRONG>
jar cvf bidder.jar bidder/*.class
<STRONG>Win32:</STRONG>
jar cvf bidder.jar bidder\*.class
</PRE>
Once the JAR file is copied to the destination directory for the Enterprise
beans,
unpack it as follows. The extraction creates a <CODE>bidder</CODE>
directory with the class files in it.
<PRE>
jar xv bidder.jar
</PRE>
<H4>seller Package</H4>
Here are the application files in the <CODE>seller</CODE>
package that make up the <CODE>Seller</CODE> Enterprise Bean.
<UL>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">seller.Seller.class</FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">seller.SellerHome.class</FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">seller.SellerBean.class</FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">auction.DeploymentDescriptor.txt</FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">SellerBeanEOImpl_ServiceStub.class</FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">SellerBeanHomeImpl_ServiceStub.class</FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">WLStub3xr4e731e6d2x3b3w5b693833v304q.class</FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">WLStub86w3x4p2x6m4b696q4kjp4p4p3b33.class</FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">WLSkel3xr4e731e6d2x3b3w5b693833v304q.class</FONT>
<LI><FONT FACE="Verdana, Arial, Helvetica, sans-serif">WLSkel86w3x4p2x6m4b696q4kjp4p4p3b33.class</FONT>
</UL>
Here is how to bundle them. Everything goes on one line,
and the command is executed one directory above where
the class files are located.
<PRE>
<STRONG>Unix:</STRONG>
jar cvf seller.jar seller/*.class
<STRONG>Win32:</STRONG>
jar cvf seller.jar seller\*.class
</PRE>
Once the JAR file is copied to the destination directory for the
Enterprise beans,
unpack it as follows. The extraction creates a <CODE>seller</CODE>
directory with the class files in it.
<PRE>
jar xv seller.jar
</PRE>
<A NAME="admin"></A>
<H3>Bundle and Deploy the Administration Applet</H3>
The Administration applet family of files consists of
the <A HREF="./Code/admin/AdminApplet.java">AdminApplet.java</A>
and <A HREF="./Code/polfile.java">polfile.java</A> files.
<P>
Here is the <CODE>jar</CODE> command to bundle them. Everything
goes on one line, and the command is executed where the
policy file is located which is one directory above
where the class files are located.
<PRE>
<STRONG>Unix:</STRONG>
jar cvf applet.jar admin/*.class polfile.java
<STRONG>Win32:</STRONG>
jar cvf applet.jar admin\*.class polfile.java
</PRE>
To deploy the applet, copy the <CODE>applet.jar</CODE> file
to the destination applet directory and extract it as follows.
The extraction creates an <CODE>admin</CODE> directory with the
Administration applet class files in it.
<PRE>
jar xf applet.jar
</PRE>
<BLOCKQUOTE>
<HR>
<STRONG>Note:</STRONG> The applet uses JDK 1.2 APIs. It needs
a policy file to access the printer and Java Plug-In to run
in a pre-JDK 1.2 browser. Information on running the applet
with Java Plug-In and a security policy file can be
found in the <A HREF="solaris.html">Solaris Platform</A> and
<A HREF="win.html">Win32 Platform</A> sections that follow.
<HR>
</BLOCKQUOTE>
<P ALIGN="RIGHT">
<FONT SIZE="-1">[<A HREF="#top">TOP</A>]</FONT>
</FONT>
</TD>
</TR>
</TABLE>
<!-- ================ -->
<!-- End Main Content -->
<!-- ================ -->
</TD>
</TR>
</TABLE>
<!-- Copyright Insert -->
<BR CLEAR="ALL">
<FORM ACTION="/cgi-bin/search.cgi" METHOD="POST">
<TABLE WIDTH="100%" CELLPADDING="0" BORDER="0" CELLSPACING="5">
<TR>
<TD VALIGN="TOP">
<P ALIGN=CENTER>
<FONT SIZE="-1" COLOR="#999999" FACE="Verdana, Arial, Helvetica, sans-serif">
[ This page was updated: <!-- new date --> 13-Oct-99 ]</font></P>
</TD>
</TR>
<TR>
<TD BGCOLOR="#CCCCCC">
<IMG SRC="/images/pixel.gif" HEIGHT="1" WIDTH="1" ALT=""></TD>
</TR>
<TR>
<TD>
<CENTER>
<FONT SIZE="-2" FACE="Verdana, Arial, Helvetica, sans-serif">
<A HREF="http://java.sun.com/products/">Products & APIs</A> |
<A HREF="/developer/index.html">Developer Connection</A> |
<A HREF="/developer/infodocs/index.shtml">Docs & Training</A> |
<A HREF="/developer/support/index.html">Online Support</A><BR>
<A HREF="/developer/community/index.html">Community Discussion</A> |
<A HREF="http://java.sun.com/industry/">Industry News</A> |
<A HREF="http://java.sun.com/solutions">Solutions Marketplace</A> |
<A HREF="http://java.sun.com/casestudies">Case Studies</A>
</FONT>
</CENTER>
</TD>
</TR>
<TR>
<TD BGCOLOR="#CCCCCC">
<IMG SRC="/images/pixel.gif" HEIGHT="1" WIDTH="1" ALT=""></TD>
</TR>
<TR>
<TD ALIGN="CENTER">
<FONT SIZE="-2" FACE="Verdana, Arial, Helvetica, sans-serif">
<A HREF="http://java.sun.com/docs/glossary.html">Glossary</A> -
<A HREF="http://java.sun.com/applets/">Applets</A> -
<A HREF="http://java.sun.com/docs/books/tutorial/">Tutorial</A> -
<A HREF="http://java.sun.com/jobs/">Employment</A> -
<A HREF="http://java.sun.com/nav/business/">Business & Licensing</A> -
<A HREF="http://java.sun.com/javastore/">Java Store</A> -
<A HREF="http://java.sun.com/casestudies/">Java in the Real World</A>
</FONT>
</TD>
</TR>
<TR>
<TD>
<CENTER>
<FONT SIZE="-2" FACE="Verdana, Arial, Helvetica, sans-serif">
<a href="/siteinfo/faq.html">FAQ</a> |
<a href="/feedback/index.html">Feedback</a> |
<a href="http://www.dynamicdiagrams.net/mapa/cgi-bin/help.tcl?db=javasoft&dest=http://java.sun.com/">Map</a> |
<A HREF="http://java.sun.com/a-z/index.html">A-Z Index</A>
</FONT>
</CENTER>
</TD>
</TR>
<TR>
<TD>
<TABLE WIDTH="100%" CELLPADDING="0" BORDER="0" CELLSPACING="0">
<TR>
<TD WIDTH="50%">
<FONT SIZE="-2" FACE="Verdana, Arial, Helvetica, sans-serif">
For more information on Java technology<BR>
and other software from Sun Microsystems, call:<BR>
</FONT>
<FONT SIZE="-1" FACE="Verdana, Arial, Helvetica, sans-serif">
(800) 786-7638<BR></FONT>
<FONT SIZE="-2" FACE="Verdana, Arial, Helvetica, sans-serif">
Outside the U.S. and Canada, dial your country's
<A HREF="http://www.att.com/business_traveler/attdirecttollfree/">AT&T Direct Access Number</A> first.<BR>
</FONT>
</TD>
<TD ALIGN="RIGHT" WIDTH="50%">
<A HREF="http://www.sun.com"><IMG SRC="/images/lgsun.gif" width="64" height="30" border="0" ALT="Sun Microsystems, Inc."></A><BR>
<FONT SIZE="-2" FACE="Verdana, Arial, Helvetica, sans-serif">
Copyright © 1995-99
<A HREF="http://www.sun.com">Sun Microsystems, Inc.</A><BR>
All Rights Reserved.
<a href="http://www.sun.com/share/text/SMICopyright.html">Legal Terms</a>.
<A HREF="http://www.sun.com/privacy/">Privacy Policy</A>.
</FONT>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</FORM>
<!-- End Copyright Insert -->
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -