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

📄 jvm.html

📁 Sun Java System Application Server Enterprise Edition 8.1 管理指南
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<?xml version="1.0" encoding="GB2312"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"           "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-CN" lang="zh-CN"><head>  <meta http-equiv="Content-Type" content="text/html; charset=GB2312" />  <meta name="keywords"           content="electronic commerce, ecommerce, ebusiness, e-business, e-commerce, enterprise software, net economy, Sun Microsystems, Sun Open Net Environment, Sun ONE, internet software" />  <meta name="Description"        content="Sun Microsystems, Inc. is delivering Sun ONE e-commerce software and enterprise solutions that enable companies to compete successfully in the Net Economy." />  <meta name="TemplateVersion"    content="Sun ONE WDT 2.3.1" />  <meta name="LASTUPDATED"        content="10/03/03 09:48:30" />  <meta name="BookTitle"          content="Sun Java System Application Server Enterprise Edition 8.1 Administration Guide 2005Q1" />  <title>第 22 章  Java 虚拟机和高级设置</title>  <link href="catalog.css" tppabs="http://docs.sun.com/source/819-1553/catalog.css" rel="stylesheet" type="text/css" />  <!-- on load bring this window to front -->  <script laguage="javascript">  top.window.focus();  </script></head><body text="#000000" link="#594FBF" vlink="#9966cc" alink="#333366" bgcolor="#FFFFFF"><a name="top"> </a><!-- navigation -->  <table width="100%" border="0" cellspacing="4" summary="Header navigation table">    <tr><td>    <p  class="pNavigation">    <a HREF="javascript:if(confirm('http://www.sun.com/software/  \n\n该文件无法用 Teleport Ultra 下载, 因为 它是一个域或路径外部被设置为它的启始地址的地址。  \n\n你想在服务器上打开它?'))window.location='http://www.sun.com/software/'" tppabs="http://www.sun.com/software/">    <img SRC="Logo.jpg" tppabs="http://docs.sun.com/source/819-1553/Logo.jpg" alt="Sun logo" valign="bottom" border="0" /></a>    &#160;&#160;&#160;&#160;    <a href="monitor.html" tppabs="http://docs.sun.com/source/819-1553/monitor.html">上一页</a>    &#160;&#160;&#160;&#160;     <a href="index.html" tppabs="http://docs.sun.com/source/819-1553/index.html">目录</a>    &#160;&#160;&#160;&#160;    <a href="apache.html" tppabs="http://docs.sun.com/source/819-1553/apache.html">下一页</a>    &#160;&#160;&#160;&#160;    </p>    </td></tr>        <tr><td valign="top" align="right" bgcolor="#594FBF">    <span class="cBookTitle">Sun Java System Application Server Enterprise Edition 8.1 管理指南 2005Q1</span>    </td></tr>  </table><!-- end navigation --><blockquote><!-- chapter content --><a name="wp511876"> </a><h2 class="pChapNumber"><span class="cGray">第 22 章</span><br /><a name="wp511878"> </a>Java 虚拟机和高级设置</h2><a name="wp511880"> </a><p class="pParagraph">本章介绍了如何配置 Java 虚拟机 (JVM&#153;) 和其他的高级设置。它包含以下各节:</p><div class="pSmartList1"><ul class="pSmartList1"><a name="wp511886"> </a><div class="pSmartList1"><li><a  href="jvm.html#wp511896" tppabs="http://docs.sun.com/source/819-1553/jvm.html#wp511896">用于 JVM&#153; 设置的管理控制台任务</a></li></div><a name="wp511892"> </a><div class="pSmartList1"><li><a  href="jvm.html#wp512174" tppabs="http://docs.sun.com/source/819-1553/jvm.html#wp512174">用于高级设置的管理控制台任务</a></li></div></ul></div><a name="wp511896"> </a><h2 class="pHeading1"><hr />用于 JVM&#153; 设置的管理控制台任务</h2><div class="pSmartList1"><ul class="pSmartList1"><a name="wp511902"> </a><div class="pSmartList1"><li><a  href="jvm.html#wp511934" tppabs="http://docs.sun.com/source/819-1553/jvm.html#wp511934">配置 JVM 常规设置</a></li></div><a name="wp511908"> </a><div class="pSmartList1"><li><a  href="jvm.html#wp512004" tppabs="http://docs.sun.com/source/819-1553/jvm.html#wp512004">配置 JVM 类路径设置</a></li></div><a name="wp511914"> </a><div class="pSmartList1"><li><a  href="jvm.html#wp512054" tppabs="http://docs.sun.com/source/819-1553/jvm.html#wp512054">配置 JVM 选项</a></li></div><a name="wp511920"> </a><div class="pSmartList1"><li><a  href="jvm.html#wp512102" tppabs="http://docs.sun.com/source/819-1553/jvm.html#wp512102">禁用安全管理器</a></li></div><a name="wp511926"> </a><div class="pSmartList1"><li><a  href="jvm.html#wp512136" tppabs="http://docs.sun.com/source/819-1553/jvm.html#wp512136">配置 JVM 事件探查器设置</a></li></div></ul></div><a name="wp511934"> </a><h3 class="pHeading2">配置 JVM 常规设置</h3><a name="wp511936"> </a><p class="pParagraph">Java 虚拟机 (JVM) 包含在 Java 2 Standard Edition (J2SE&#153;) 软件中,它是 Application Server 所需的软件。由于不正确的 JVM 设置将导致服务器停止运行,因此您应当谨慎地更改这些设置。 </p><a name="wp511938"> </a><p class="pParagraph">配置 Application Server 所使用的 JVM 的常规设置:</p><div class="pSmartList1"><ol type="1" class="pSmartList1"><a name="wp511940"> </a><div class="pSmartList1"><li>在树组件中,选择“Application Server”节点。</li></div><a name="wp511942"> </a><div class="pSmartList1"><li>单击“JVM 设置”选项卡。</li></div><a name="wp511944"> </a><div class="pSmartList1"><li>默认情况下,选项卡下的“常规”链接已处于选取状态。</li></div><a name="wp511946"> </a><div class="pSmartList1"><li>在“JVM 常规设置”页面中,您可以指定以下内容:</li></div><div class="pSmartList2"><ol type="a" class="pSmartList2"><a name="wp511948"> </a><div class="pSmartList2"><li>在“Java 主目录”字段中,输入 Java 2 Standard Edition (J2SE) 软件的安装目录名称。</li></div><a name="wp511954"> </a><p class="pStepParaI2">Application Server 依赖于 J2SE 软件运行。要验证此版本是否支持您所指定的 J2SE 版本,请参阅发行说明。(请参见<a  href="gstart.html#wp397424" tppabs="http://docs.sun.com/source/819-1553/gstart.html#wp397424">更多信息</a>一节中的链接。)</p><a name="wp511956"> </a><p class="pStepParaI2">注:如果输入不存在的目录名称或输入不受支持的 J2SE 软件版本的安装目录名称,则 Application Server 将无法启动。</p><a name="wp511958"> </a><div class="pSmartList2"><li>在“Javac”字段中,键入 Java 编程语言编译程序的命令行选项。</li></div><a name="wp511960"> </a><p class="pStepParaI2">当部署 EJB 组件后,Application Server 将运行编译程序。</p><a name="wp511962"> </a><div class="pSmartList2"><li>要通过 JPDA(Java Platform Debugger Architecture)来设置调试,请选中“启用调试”复选框并在“调试选项”字段中指定选项。</li></div><a name="wp511972"> </a><p class="pStepParaI2">JPDA 供应用程序开发者使用。有关更多信息,请参见《Application Server Developer's Guide》的 "Debugging J2EE Applications" 一章。(有关指向此指南的链接,请参见“<a  href="gstart.html#wp397424" tppabs="http://docs.sun.com/source/819-1553/gstart.html#wp397424">更多信息</a>”。)</p><a name="wp511974"> </a><div class="pSmartList2"><li>在“RMI 编译选项”字段中,键入 RMIC 编译程序的命令行选项。</li></div><a name="wp511976"> </a><p class="pStepParaI2">当部署 EJB 组件后,Application Server 将运行 RMIC 编译程序。</p><a name="wp511978"> </a><div class="pSmartList2"><li>在“字节码预处理程序”字段中,键入以逗号分隔的类名列表。</li></div><a name="wp511980"> </a><p class="pStepParaI2">每个类都必须实现 <code class="cCode">com.sun.appserv.BytecodePreprocessor</code> 接口。将按指定顺序调用这些类。 </p><a name="wp511986"> </a><p class="pStepParaI2">您也许需要在“字节码预处理程序”字段中输入某些工具(例如,事件探查器)。事件探查器生成用于分析服务器性能的信息。有关事件探查的更多信息,请参见《Application Server Developer&#39;s Guide》的 "Debugging J2EE Applications" 一章。</p></ol></div><a name="wp511988"> </a><div class="pSmartList1"><li>单击“保存”。</li></div><a name="wp511990"> </a><div class="pSmartList1"><li>重新启动服务器。</li></div></ol></div><a name="wp512004"> </a><h3 class="pHeading2">配置 JVM 类路径设置</h3><a name="wp512006"> </a><p class="pParagraph">类路径就是 JAR 文件的列表,Java 运行时环境将在此列表中搜索类和其他资源文件。</p><a name="wp512008"> </a><p class="pParagraph">要配置 Application Server 的 JVM 类路径,请执行以下步骤:</p><div class="pSmartList1"><ol type="1" class="pSmartList1"><a name="wp512010"> </a><div class="pSmartList1"><li>在树组件中,选择“Application Server”节点。</li></div><a name="wp512012"> </a><div class="pSmartList1"><li>单击“JVM 设置”选项卡。</li></div><a name="wp512014"> </a><div class="pSmartList1"><li>选择选项卡下面的“路径设置”链接。</li></div><a name="wp512016"> </a><div class="pSmartList1"><li>在“JVM 类路径设置”页面中,您可以指定以下内容:</li></div><div class="pSmartList2"><ol type="a" class="pSmartList2"><a name="wp512018"> </a><div class="pSmartList2"><li>在“环境类路径”复选框中,保留默认选择以忽略 CLASSPATH 环境变量。</li></div><a name="wp512020"> </a><p class="pStepParaI2">对于编程中的基本教程而言,CLASSPATH 环境变量使用起来很方便,但是不建议将此变量用于企业环境。</p><a name="wp512022"> </a><div class="pSmartList2"><li>要查看 Application Server 的类路径,请检查“服务器类路径”字段中的只读内容。</li></div><a name="wp512024"> </a><div class="pSmartList2"><li>要将一个 JAR 文件插入到服务器类路径的开头,请在“类路径前缀”字段中输入此文件的完整路径名。</li></div><a name="wp512026"> </a><div class="pSmartList2"><li>要将一个 JAR 文件添加到服务器类路径的末尾,请在“类路径后缀”字段中输入此文件的完整路径名。</li></div><a name="wp512032"> </a><p class="pStepParaI2">例如,假设您要指定数据库驱动程序的 JAR 文件。请参见<a  href="jdbc.html#wp92623" tppabs="http://docs.sun.com/source/819-1553/jdbc.html#wp92623">集成 JDBC 驱动程序</a>。</p><a name="wp512034"> </a><div class="pSmartList2"><li>在“本地库路径前缀”和“本地库路径后缀”字段中,您可以将条目添加到本地库路径的开头或末尾。</li></div><a name="wp512036"> </a><p class="pStepParaI2">将服务器的本地共享库的相对路径、标准 JRE 本地库路径、shell 环境设置(UNIX 中的 LD_LIBRARY_PATH)以及在“JVM 事件探查器设置”页面中指定的任意路径顺序连接起来就构成了本地库路径。</p></ol></div>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -