<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="/layout/rss.xsl" media="screen"?>
<!-- generator="blogHi!/1.0" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
>

<channel>
	<title>welcome to googlefans</title>
	<link>http://googlefans.bloghi.com/</link>
	<description></description>
	<pubDate>Sun, 21 Mar 2010 09:23:47 +0000</pubDate>
	<generator>http://bloghi.com/</generator>
	<image>
		<url>http://googlefans.bloghi.com/img_ch.hi?id=6618</url>
		<title>welcome to googlefans</title>
		<link>http://googlefans.bloghi.com/</link>
	</image>

	<item>
		<title>javac the Java Compiler</title>
		<link>http://googlefans.bloghi.com/2006/02/07/javac-the-java-compiler.html</link>
		<comments>http://googlefans.bloghi.com/2006/02/07/javac-the-java-compiler.html#comments</comments>
		<pubDate>Tue, 07 Feb 2006 23:52:43 +0000</pubDate>
		<guid>http://googlefans.bloghi.com/2006/02/07/javac-the-java-compiler.html</guid>
		<description> Some programming languages, such as C and Fortran, are compiled languages: the source code is compiled into machine code that is unique to the target hardware platform and operating system. Other languages, such as like APL and lisp, are interpreted...</description>
		<content:encoded><![CDATA[<P>Some programming languages, such as C and Fortran, are compiled languages: the source code is compiled into machine code that is unique to the target hardware platform and operating system. Other languages, such as like APL and lisp, are interpreted languages: the source code is executed by running it through an interpreter. Both approaches have their strengths and weaknesses. Compiled programs tend to be faster and more efficient, but the compiled program can be run on only one hardware platform and operating system. Interpreted programs tend to be less efficient but potentially can be run, without change, on any platform for which an interpreter exists. 
<P>Java is both compiled and interpreted. The Java compiler, called <I>javac</I>, compiles (translates) the Java source code into an intermediate-level code called <I>byte codes</I>. These bytecodes are not directly executable on any hardware platform that is currently in existence; rather, the codes are interpreted by the Java interpreter, which can operate either by itself or as part of a Web browser such as Netscape. 
<P>The fact that Java is both compiled and interpreted can give you, the Java programmer, the best of both worlds. A program that you write in Java will be efficient (because it is compiled) and capable of running on a multitude of platforms (because it is interpreted). 
<P>In this chapter, you learn the following: 
<UL>
<LI>How to get started with the Java compiler 
<LI>The Java compiler is easier to use than it seems. You'll find that out when you compile and run your first Java program. 
<LI>How the Java directories are organized 
<LI>The Java Development Kit is split across a number of directories. This chapter covers those directories that are significant to the compiler. 
<LI>How to use the various compiler options 
<LI>The Java compiler supports a number of options that vary its operation. You'll learn about those in this chapter. 
<LI><B>How to troubleshoot common compiler problems</B> 
<LI>You'll learn to recognize and solve some of the problems that you may encounter with the Java compiler, especially when you use it for the first time. </LI></UL><A name=0301>
<H2>Finding javac on your system&nbsp; </A><A href="http://www.job1998.com/"><FONT color=#000000><SPAN style="TEXT-DECORATION: none">求职</SPAN></FONT></A><A name=0301>, </A><A href="http://www.job1998.com/"><FONT color=#000000><SPAN style="TEXT-DECORATION: none">招聘</SPAN></FONT></A><A name=0301>找易才网</H2></A>
<P>The installation process that you completed in chapter 3 creates a hierarchy of directories, beginning with a directory called java. When we installed Java on our system, we put the java directory below a root-level directory called Languages, but you can put yours wherever you think is best, including directly below the root. After installation, then, we have the following directories on our machine: </P>]]></content:encoded>
		<wfw:commentRSS>http://googlefans.bloghi.com/2006/02/07/javac-the-java-compiler.html#comments</wfw:commentRSS>
	</item>
	<item>
		<title>The environment variables.</title>
		<link>http://googlefans.bloghi.com/2006/02/07/the-environment-variables.html</link>
		<comments>http://googlefans.bloghi.com/2006/02/07/the-environment-variables.html#comments</comments>
		<pubDate>Tue, 07 Feb 2006 23:51:56 +0000</pubDate>
		<guid>http://googlefans.bloghi.com/2006/02/07/the-environment-variables.html</guid>
		<description> The environment variables are settings used to determine the HotJava and Java Interpreter environments for your system. 


The environment variables are used by HotJava, and not Netscape. If you do not use the HotJava Browser, you may want to skip...</description>
		<content:encoded><![CDATA[<P>The environment variables are settings used to determine the HotJava and Java Interpreter environments for your system. </P>
<P><IMG height=0 src="http://www.lib.tsinghua.edu.cn/chinese/INTERNET/Java/note.gif" width=0 border=2></P>
<BLOCKQUOTE>
<P>The environment variables are used by HotJava, and not Netscape. If you do not use the HotJava Browser, you may want to skip this section, or you may just want to skim through it to gain some knowledge on HotJava. </P></BLOCKQUOTE>
<P>The environment variables are as follows: </P>
<UL>
<LI><TT>WWW_HOME</TT> 
<LI>HOTJAVA_HOME 
<LI>HOTJAVA_READ_PATH 
<LI>HOTJAVA_WRITE_PATH 
<LI><TT>CLASSPATH</TT> </LI></UL>
<H3>The WWW_HOME environment variable</H3>
<P>This environment variable sets the HotJava default URL for the home page. </P>
<H3>The HOTJAVA_HOME environment variable</H3>
<P>This environment variable sets the directory <A href="http://wowgold.tomore.com/"><FONT color=#000000><SPAN style="TEXT-DECORATION: none">wow gold</SPAN></FONT></A>where HotJava will search for the necessary files that are needed to run the Browser. </P>
<H3>The HOTJAVA_READ_PATH environment variable</H3>
<P>This environment variable tells HotJava, the directory where file read access can is allowed to applets. This can be used as a security precaution for applets that might read unauthorized information, and return it to a remote site. </P>
<H3>The HOTJAVA_WRITE_PATH environment variable</H3>
<P>This environment variable tells HotJava, which directories are allowed to be written to by applets. Similar to HOTJAVA_READ_PATH, this variable can be used as a security measure to control the ability of applets writing files on your system. </P>
<H3>The CLASSPATH environment variable</H3>
<P>This environment variable determines where all classes are imported from. Use semicolons to separate classes. </P>]]></content:encoded>
		<wfw:commentRSS>http://googlefans.bloghi.com/2006/02/07/the-environment-variables.html#comments</wfw:commentRSS>
	</item>
	<item>
		<title>The Java environment tools</title>
		<link>http://googlefans.bloghi.com/2006/02/07/the-java-environment-tools.html</link>
		<comments>http://googlefans.bloghi.com/2006/02/07/the-java-environment-tools.html#comments</comments>
		<pubDate>Tue, 07 Feb 2006 23:50:10 +0000</pubDate>
		<guid>http://googlefans.bloghi.com/2006/02/07/the-java-environment-tools.html</guid>
		<description> The JDK comes with a collection of tools that are used with Java programs to perform various functions. This section discusses these tools, and lists their various functions.The Java environment tools consists of the following: 

appletviewer (for...</description>
		<content:encoded><![CDATA[<P>The JDK comes with a collection of tools that are used with Java programs to perform various functions. This section discusses these tools, and lists their various functions.The Java environment tools consists of the following: </P>
<UL>
<LI><TT>appletviewer (for viewing Java applets stand-alone)</TT> 
<LI>javac (The Java compiler) 
<LI>java (The Java interpreter) 
<LI>javap (The Java disassembler) 
<LI>javah (for creating C header files, and stub files) 
<LI>javadoc (for creating HTML documents on the applet) 
<LI><TT>jdb (The Java debugger)</TT> </LI></UL>
<P>These tools should all be located in the \java\bin directory. To use any of these tools, type it's syntax (options described in this section should be typed in without the square brackets []) <A href="http://www.tennischina.cn/"><FONT color=#000000><SPAN style="TEXT-DECORATION: none">wow gold</SPAN></FONT></A>at the command prompt. </P>
<H3>The Appletviewer tool</H3>
<P>The appletviewer tool allows you to view your applet as a stand-alone Java program. It requires an HTML file with the applet tag embedded in it as shown in previous examples. This tool is the only one of the JDK collection that has a Graphical User Interface. figure 2.5 shows the tool's GUI. </P><PRE>fig. 2.5

Appletviewer's GUI Interface.

</PRE>
<H4>The appletviewer's Applet menu</H4>
<P>As shown in figure 2.5 the appletviewer's GUI has one menu - Applet. The menu items of this menu have the following functions: </P>
<UL>
<LI><TT>Restart</TT>-Restarts the applet using the current settings. 
<LI>Reload-Reloads the applet. Changes in the class file will be applied upon reload. 
<LI>Clone-Clones (duplicates) the current applet, using the same settings to create another appletviewer instance. 
<LI>Tag-Shows the HTML applet tag that was used to run the current applet, as well as any parameters that were passed to the applet from the HTML tag. (see fig. 2.6). 
<LI>Info-Shows special information about the applet, that was set within the applet's program. (See fig. 2.7) 
<LI>Properties-Shows the appletviewer security properties. These settings allow you to configure Appletviewer for a network environment that includes a Firewall Proxy, or an HTTP proxy, using the relative proxy server, and proxy port boxes. The Network access box, allows you to select the type of network access that appletviewer is allowed. The choices are: No network access, Applet Host (default), Unrestricted. The Class access box allows you to chose what kind of access-Restricted, or Unrestricted-you would like Appletviewer to have on other classes.(see fig. 2.8) 
<LI><TT>Quit</TT>-Closes the appletviewer window, and terminates the applet. </LI></UL>]]></content:encoded>
		<wfw:commentRSS>http://googlefans.bloghi.com/2006/02/07/the-java-environment-tools.html#comments</wfw:commentRSS>
	</item>
	<item>
		<title>Testing your installation</title>
		<link>http://googlefans.bloghi.com/2006/02/07/testing-your-installation.html</link>
		<comments>http://googlefans.bloghi.com/2006/02/07/testing-your-installation.html#comments</comments>
		<pubDate>Tue, 07 Feb 2006 23:48:29 +0000</pubDate>
		<guid>http://googlefans.bloghi.com/2006/02/07/testing-your-installation.html</guid>
		<description> Now after all this preparation, let's see if our installation works. We would want to test both Java applets, and Java applications since each are handled differently by your system, and the Java environment. A Java application is just what the name...</description>
		<content:encoded><![CDATA[<P>Now after all this preparation, let's see if our installation works. We would want to test both Java applets, and Java applications since each are handled differently by your system, and the Java environment. A Java application is just what the name implies-a stand-alone Java program that is executed on your system by using the Java Interpreter. A Java applet is usually a remote Java program executed by a Web Browser (Netscape 2.0 for example).&nbsp;<A href="http://www.uuxee.com.cn/"><FONT color=#000000><SPAN style="TEXT-DECORATION: none">wow gold</SPAN></FONT></A>The Browser locates the applet by referencing its HTML tag (&lt;applet code="myApplet" width = somewidth height = someheight&gt; &lt;/applet&gt;) embedded in a Web Page. </P>
<H3>Testing with a Java applet.</H3>
<P>There is no better way to test our installation on an applet, than to actually write one. The following applet is a fairly simple one, and there is no need to skip to chapter 16 so that you can understand applets better and then return to this test. </P><PRE><B><I>FancyHello.java</I></B>

</PRE>
<P>Follow the these steps to test an applet in the Java environment. </P>
<H4>Creating a test applet. </H4>
<P>Using an editor (I use MS DOS Editor) create a new file called FancyHello.java by typing in the following: </P>]]></content:encoded>
		<wfw:commentRSS>http://googlefans.bloghi.com/2006/02/07/testing-your-installation.html#comments</wfw:commentRSS>
	</item>
</channel>
</rss>