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

📄 appendix-d.html

📁 java game programming e-book
💻 HTML
字号:
<HTML>
<HEAD>
<META name=vsisbn content="1571690433"><META name=vstitle content="Black Art of Java Game Programming"><META name=vsauthor content="Joel Fan"><META name=vsimprint content="Sams"><META name=vspublisher content="Macmillan Computer Publishing"><META name=vspubdate content="11/01/96"><META name=vscategory content="Web and Software Development: Programming, Scripting, and Markup Languages: Java"><TITLE>Black Art of Java Game Programming:Basic JDK Tools</TITLE>
<!-- HEADER --><STYLE type="text/css">  <!-- A:hover  { 	color : Red; } --></STYLE><META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"><script><!--function displayWindow(url, width, height) {         var Win = window.open(url,"displayWindow",'width=' + width +',height=' + height + ',resizable=1,scrollbars=yes');	if (Win) {		Win.focus();	}}//--></script><SCRIPT><!--function popUp(url) {        var Win = window.open(url,"displayWindow",'width=400,height=300,resizable=1,scrollbars=yes');	if (Win) {		Win.focus();	}}//--></SCRIPT><script language="JavaScript1.2"><!--function checkForQuery(fm) {  /* get the query value */  var i = escape(fm.query.value);  if (i == "") {      alert('Please enter a search word or phrase');      return false;  }                  /* query is blank, dont run the .jsp file */  else return true;  /* execute the .jsp file */}//--></script></HEAD><BODY> 
<TABLE border=0 cellspacing=0 cellpadding=0>
<tr>
<td width=75 valign=top>
<img src="1571690433.gif" width=60 height=73 alt="Black Art of Java Game Programming" border="1">
</td>
<td align="left">
    <font face="arial, helvetica" size="-1" color="#336633"><b>Black Art of Java Game Programming</b></font>
    <br>
    <font face="arial, helvetica" size="-1"><i>by Joel Fan</i>
    <br>
    Sams,&nbsp;Macmillan Computer Publishing
    <br>
    <b>ISBN:</b>&nbsp;1571690433<b>&nbsp;&nbsp;&nbsp;Pub Date:</b>&nbsp;11/01/96</font>&nbsp;&nbsp;
</td>
</tr>
</table>
<P>

<!--ISBN=1571690433//-->
<!--TITLE=Black Art of Java Game Programming//-->
<!--AUTHOR=Joel Fan//-->
<!--AUTHOR=Eric Ries//-->
<!--AUTHOR=Calin Tenitchi//-->
<!--PUBLISHER=Macmillan Computer Publishing//-->
<!--IMPRINT=Sams//-->
<!--APPENDIX=D//-->
<!--PAGES=859-863//-->
<!--UNASSIGNED1//-->
<!--UNASSIGNED2//-->

<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="ewtoc.html">Table of Contents</A></TD>
</TR>
</TABLE>
</CENTER>
<P><BR></P>
<H2><A NAME="Heading1"></A><FONT COLOR="#000077">Appendix D:<BR>Basic JDK Tools
</FONT></H2>
<P>The Java Developer&#146;s Kit (JDK) consists of the following programs:
</P>
<DL>
<DD><B>&#149;</B>&nbsp;&nbsp;javac. This program is the Java compiler that compiles source files written in the Java language to bytecodes.
<DD><B>&#149;</B>&nbsp;&nbsp;java. This program is the Java interpreter that runs Java programs.
<DD><B>&#149;</B>&nbsp;&nbsp;jdb. This tool is the Java debugger that helps you track down bugs in Java programs.
<DD><B>&#149;</B>&nbsp;&nbsp;javah. This tool allows you to interface Java code with programs written in other languages.
<DD><B>&#149;</B>&nbsp;&nbsp;javap. This tool disassembles compiled Java bytecodes.
<DD><B>&#149;</B>&nbsp;&nbsp;javadoc. This program creates HTML documentation for Java source code.
<DD><B>&#149;</B>&nbsp;&nbsp;appletviewer. This program allows you to execute applets without using a Web browser.
</DL>
<P>The following sections cover selected details of the <I>javac, java</I>, and <I>appletviewer</I> commands. You will find the complete JDK documentation at the URL <A HREF="http://java.sun.com/">http://java.sun.com/</A>.</P>
<P><FONT SIZE="+1"><B>javac - The Java Compiler</B></FONT></P>
<P><I>javac</I> compiles Java source code.</P>
<P><FONT SIZE="+1"><B><I>Synopsis</I></B></FONT></P>
<!-- CODE SNIP //-->
<PRE>
javac [options] filename.java ...
</PRE>
<!-- END CODE SNIP //-->
<P><FONT SIZE="+1"><B><I>Description</I></B></FONT></P>
<P>The <I>javac</I> command compiles Java source code into bytecodes that can be executed by the Java interpreter. The source files must have the .java extension, and each compiled class is stored in a corresponding .class file. For example, the bytecodes for a class called Murder are stored in the file Murder.class.</P>
<P>If a referenced class is not defined within the source files passed to javac, then javac searches the classpath for this class. The classpath is specified by the CLASSPATH environment variable, or the -classpath option.</P>
<P><FONT SIZE="+1"><B><I>Options</I></B></FONT></P>
<P>Following are some options you can place on the command line when invoking javac.
</P>
<P><B>-classpath path</B></P>
<P>This option specifies the path that javac uses to find classes. Specifying the classpath with this option overrides the CLASSPATH environment variable. For UNIX machines, directories in the path are delimited by colons, as in the following:
</P>
<!-- CODE SNIP //-->
<PRE>
/escape/users/fan/classes:/usr/local/java/classes:.
</PRE>
<!-- END CODE SNIP //-->
<P>For Windows machines, directories in the path are delimited by semicolons:
</P>
<!-- CODE SNIP //-->
<PRE>
C:\ira\programs\java\classes;C:\tools\java\classes;.
</PRE>
<!-- END CODE SNIP //-->
<P><B>-d directory</B></P>
<P>This option specifies the root directory where the .class files are saved. By default, javac saves .class files in the current directory.
</P>
<P><B>-O</B></P>
<P>This option optimizes the compiled code by inlining static, final, and private methods. You should use this option when compiling your games; however, keep in mind that the resulting .class files may be larger in size. In addition, versions of some browsers may not work correctly with optimized code.
</P>
<P><B>-verbose</B></P>
<P>With this option, the compiler prints the files being compiled and the class files that are loaded.
</P>
<P><FONT SIZE="+1"><B><I>Environment Variables</I></B></FONT></P>
<P>The CLASSPATH environment variable specifies the path that javac uses to find user-defined classes. Directories are separated by colons (UNIX) or semicolons (Windows). See the -classpath option above for examples of paths.
</P>
<P><FONT SIZE="+1"><B>java - The Java Interpreter</B></FONT></P>
<P><I>java</I> executes Java programs.</P>
<P><FONT SIZE="+1"><B><I>Synopsis</I></B></FONT></P>
<!-- CODE SNIP //-->
<PRE>
java [options] classname &lt;args&gt;
</PRE>
<!-- END CODE SNIP //-->
<P><FONT SIZE="+1"><B><I>Description</I></B></FONT></P>
<P>The <I>java</I> command executes the Java bytecodes found in classname.class. The source file for classname.class must include a main() method, from which execution starts (see Chapter 1/Three Sample Applications for further details).</P>
<P>The CLASSPATH environment variable, or the -classpath option, specifies the location of user-defined classes.</P>
<P><FONT SIZE="+1"><B><I>Options</I></B></FONT></P>
<P>Following are some options you can place on the command line when invoking java.
</P>
<P><B>-cs, -checksource</B></P>
<P>This option tells java to compare the modification time of the compiled class file to that of the source file. If the source file is more recent, it is recompiled, and the resulting class file is loaded and executed.
</P>
<P><B>-classpath path</B></P>
<P>This option specifies the path that javac uses to find classes. Specifying the classpath with this option overrides the CLASSPATH environment variable. For UNIX machines, directories in the path are delimited by colons, as in the following:
</P>
<!-- CODE SNIP //-->
<PRE>
.:/escape/users/fan/classes:/usr/local/java/classes
</PRE>
<!-- END CODE SNIP //-->
<P>For Windows machines, directories in the path are delimited by semicolons:
</P>
<!-- CODE SNIP //-->
<PRE>
.;C:\ira\programs\java\classes;C:\tools\java\classes
</PRE>
<!-- END CODE SNIP //-->
<P><B>-noasyngc</B></P>
<P>This option turns off asynchronous garbage collection. Thus, the garbage collector executes only when it is called explicitly or the program runs out of memory. Normally, it runs concurrently with the program as a separate thread.
</P>
<P><B>-noverify</B></P>
<P>This option turns off the bytecode verifier.
</P>
<P><B>-v, -verbose</B></P>
<P>This option tells java to print a message to <I>standard output</I> each time a class file is loaded.</P>
<P><B>-verify</B></P>
<P>This option tells the bytecode verifier to check all classes that are loaded.
</P>
<P><FONT SIZE="+1"><B><I>Environment Variables</I></B></FONT></P>
<P>The CLASSPATH environment variable specifies the path that java uses to find user-defined classes. Directories are separated by colons (UNIX) or semicolons (Windows). See the -classpath option above for examples of paths.
</P>
<P><FONT SIZE="+1"><B>appletviewer - The Java Applet Viewer</B></FONT></P>
<P><I>appletviewer</I> executes Java applets.</P>
<P><FONT SIZE="+1"><B><I>Synopsis</I></B></FONT></P>
<!-- CODE SNIP //-->
<PRE>
appletviewer urls
</PRE>
<!-- END CODE SNIP //-->
<P><FONT SIZE="+1"><B><I>Description</I></B></FONT></P>
<P>The appletviewer loads, displays, and executes each applet referenced by the documents found at the specified URLs. The applets are referenced using the APPLET tag (see the Applet Tags section in Appendix A for more information). Each applet is displayed in its own window.
</P>
<P><FONT SIZE="+1"><B><I>Environment Variables</I></B></FONT></P>
<P>The CLASSPATH environment variable specifies the path that appletviewer uses to find user-defined classes. Directories are separated by colons (UNIX) or semicolons (Windows), as with the <I>java</I> and <I>javac</I> commands. If CLASSPATH is not set, the appletviewer searches for classes in the current directory and the system classes. appletviewer does not support the -classpath option found in java and javac.</P><P><BR></P>
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="ewtoc.html">Table of Contents</A></TD>
</TR>
</TABLE>
</CENTER>


</BODY>

⌨️ 快捷键说明

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