⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 win.html

📁 jdbc书
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<A NAME="security"></A>
<H3>Security Policy File</H3>

The auction application uses an applet running in a browser for administrative
operations. In the Java<FONT SIZE="-2"><SUP>TM</SUP></FONT> 2 platform, applets are restricted to a
sandbox-like environment and need permission to access system resources
outside their restricted environment. Applets are restricted to read
operations within their local directory. All other access operations
require permission.

<A NAME="types"></A>
<H4>Types of Policy Files</H4>

You need a policy file to grant access permissions to the
Administration applet. If the applet runs on a disk other 
than the disk where the browser is running, the applet will
also need to be signed.  See 
<A HREF="signed.html">Signed Applets</A> for information
on signing and deploying applets.

<P>
There are three kinds of policy files: 
system, user, and program.
The system policy file is located in
<CODE>jdk1.2\jre\lib\security\java.policy</CODE> or
<CODE>jre1.2\lib\security/java.policy</CODE> and contains
permissions for everyone on the system. 

<P>
The user policy file is located in the user's home directory.
The user policy file provides a way to give certain users
additional permissions over those granted to everyone on
the system. The permissions in the system file are combined with
the permissions in the user file.

<P>
A program policy file can be located anywhere. It is
specifically named when an application is invoked
with the <CODE>java </CODE> command or when an applet
is invoked with applet viewer. When an application or
applet is invoked with a specific policy file, the permissions
in that policy file take the place of (are not combined with)
permissions specified in the system or user policy file.
Program policy files are used for program testing or
intranet deployment of applets and applications.

<A NAME="file"></A>
<H4>Install the Security Policy File</H4>

Place the security policy file in your home directory and name
it <CODE>java.policy</CODE>. When the applet tries to perform an action that
requires a policy file with a permission, the policy file is loaded from this
directory and remains in effect until you exit and restart the browser.

<P>
If an applet tries to perform an access operation without the right
permission, it quietly quits without raising  either an applet or
a browser error.

<A NAME="change"></A>
<H4>Changing the Name or Location</H4>

You can change the name and/or location of the default system or
user policy file. Edit the  <CODE>jdk1.2\jre\lib\security\java.security</CODE>
or <CODE>jre1.2\lib\security\java.security</CODE>
file and add a third entry specifying the name and location
of an alternative policy file. 


<PRE>
  policy.url.1=file:${java.home}\lib\security\java.policy
  policy.url.2=file:${user.home}\java.policy
  policy.url.3=file:\&lt;mypolicyfile path and name&gt;
</PRE>

<BLOCKQUOTE>
<HR>
<STRONG>Note:</STRONG> On Windows/NT machines, you might
place the policy file in the 
<CODE>C:\Winnt\Profiles\&lt;userid&gt;\java.policy</CODE>
directory.
<HR>
</BLOCKQUOTE>

<A NAME="run"></A>
<H3>Run the Administration Applet</H3>

Copy the Java Archive (JAR) file with the Administration
applet and policy file to its final location. In this
example, that location is the <CODE>\home\zelda\public_html</CODE>
directory. Next, extract the applet class file and policy file
from the JAR file:

<PRE>
  cp admin.jar \home\zelda\public_html
  jar xf applet.jar
</PRE>

The extraction places the policy file under <CODE>public_html</CODE>
and creates an <CODE>admin</CODE> directory under
the <CODE>public_html</CODE> directory with the
applet class file in it. Rename the policy file in the
<CODE>public_html</CODE> directory to
<CODE>java.policy</CODE> and copy it to your home directory.

<P>
In the <CODE>public_html</CODE> directory, create an HTML file that invokes
the Administration applet class. Be sure to include the <CODE>admin</CODE>
directory when you specify the applet class to the <CODE>CODE</CODE> option.
Note that when using Java Plug-In, you cannot have the browser
load the class file from the Java Archive (JAR) file.

<PRE>
&lt;HTML&gt;
&lt;BODY&gt;
&lt;APPLET CODE=admin/AdminApplet.class
  WIDTH=550
  HEIGHT=150&gt;
&lt;/APPLET&gt;
&lt;/BODY&gt;
&lt;/HTML&gt;
</PRE>

Start the HTML Converter. 

<PRE>
  java HTMLConverter
</PRE>

In the HTML Converter graphical user interface, select <CODE>One File:</CODE>,
specify the path to the <CODE>admin.html</CODE> file,
and click the <CODE>Convert</CODE> button.

<A NAME="how"></A>
<H3>How Does It Work?</H3>

On Windows machines, the Java Plug-In finds the Java Runtime 
Environment (JRE) by running the OLE custom control file 
<CODE>beans.ocx</CODE> installed by default in the 
<CODE>\Program Files\JavaSoft\1.2\bin</CODE> web browser directory.
The OLE control examines the Windows registry to find the Java Plug-In
key and uses the value associated with that key to find the installed JRE.

<P>
If you find that the wrong JRE is being loaded, use <CODE>regedit</CODE> 
to check the Java Plug-In registry values for the current user. If no JRE 
is installed, the control checks the Java Plug-in values for 
<CODE>HKEY_LOCAL_MACHINE</CODE>. You should see a value for <CODE>Java Runtime
Environment</CODE> under <CODE>Software\JavaSoft</CODE>.

<P>
<IMG SRC="./Art/ConvertWin.gif" WIDTH="450" HEIGHT="309">

<P>
After the conversion completes, load the <CODE>admin.html</CODE> file in your browser.

<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 --> 14-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 &amp; APIs</A> | 
    <A HREF="/developer/index.html">Developer Connection</A> | 
    <A HREF="/developer/infodocs/index.shtml">Docs &amp; 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 &amp; 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&amp;T&nbsp;Direct&nbsp;Access&nbsp;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 &copy; 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&nbsp;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 + -