﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>语源科技BlogJava-Programming on the fly</title><link>http://www.blogjava.net/Werther/</link><description>Live as if you were to die tomorrow. Learn as if you were to live forever.
</description><language>zh-cn</language><lastBuildDate>Sat, 14 Mar 2026 22:18:36 GMT</lastBuildDate><pubDate>Sat, 14 Mar 2026 22:18:36 GMT</pubDate><ttl>60</ttl><item><title>oracle日期时间的加减法</title><link>http://www.blogjava.net/Werther/archive/2011/11/11/363532.html</link><dc:creator>Werther</dc:creator><author>Werther</author><pubDate>Fri, 11 Nov 2011 07:34:00 GMT</pubDate><guid>http://www.blogjava.net/Werther/archive/2011/11/11/363532.html</guid><wfw:comment>http://www.blogjava.net/Werther/comments/363532.html</wfw:comment><comments>http://www.blogjava.net/Werther/archive/2011/11/11/363532.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/Werther/comments/commentRss/363532.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/Werther/services/trackbacks/363532.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: Oracle中日期时间的操作比较和加减-入门基础&nbsp;&nbsp;<a href='http://www.blogjava.net/Werther/archive/2011/11/11/363532.html'>阅读全文</a><img src ="http://www.blogjava.net/Werther/aggbug/363532.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/Werther/" target="_blank">Werther</a> 2011-11-11 15:34 <a href="http://www.blogjava.net/Werther/archive/2011/11/11/363532.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>使用CSS截断过长文字的方法</title><link>http://www.blogjava.net/Werther/archive/2011/01/17/343083.html</link><dc:creator>Werther</dc:creator><author>Werther</author><pubDate>Mon, 17 Jan 2011 03:13:00 GMT</pubDate><guid>http://www.blogjava.net/Werther/archive/2011/01/17/343083.html</guid><wfw:comment>http://www.blogjava.net/Werther/comments/343083.html</wfw:comment><comments>http://www.blogjava.net/Werther/archive/2011/01/17/343083.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/Werther/comments/commentRss/343083.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/Werther/services/trackbacks/343083.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 我们在浏览网页的时候，常常会看到某些网站的文章标题由于过长而只显示一部分，另一部分用省略号来表示，这是为了防止标题过长而导致页面排版不好看。那么这个文章标题省略号是如何实现的呢？目前常见的方法是通过动态语言程序来控制，判断标题的长度，然后截取部分来显示，其余的用省略号显示，这样往往在英文和中文的长度上难以判断。今天在网上看到可以用CSS来实现，效果还不错，拿来分享。&nbsp;&nbsp;<a href='http://www.blogjava.net/Werther/archive/2011/01/17/343083.html'>阅读全文</a><img src ="http://www.blogjava.net/Werther/aggbug/343083.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/Werther/" target="_blank">Werther</a> 2011-01-17 11:13 <a href="http://www.blogjava.net/Werther/archive/2011/01/17/343083.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Linux下init初始化配置详解</title><link>http://www.blogjava.net/Werther/archive/2010/12/01/339555.html</link><dc:creator>Werther</dc:creator><author>Werther</author><pubDate>Wed, 01 Dec 2010 14:39:00 GMT</pubDate><guid>http://www.blogjava.net/Werther/archive/2010/12/01/339555.html</guid><wfw:comment>http://www.blogjava.net/Werther/comments/339555.html</wfw:comment><comments>http://www.blogjava.net/Werther/archive/2010/12/01/339555.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/Werther/comments/commentRss/339555.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/Werther/services/trackbacks/339555.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 　　init是Linux系统操作中不可缺少的程序之一。<br>　　所谓的init进程，它是一个由内核启动的用户级进程。<br>　　内核自行启动（已经被载入内存，开始运行，并已初始化所有的设备驱动程序和数据结构等）之后，就通过启动一个用户级程序init的方式，完成引导进程。所以,init始终是第一个进程（其进程编号始终为1）。<br>　　内核会在过去曾使用过init的几个地方查找它，它的正确位置（对Linux系统来说）是/sbin/init。如果内核找不到init，它就会试着运行/bin/sh，如果运行失败，系统的启动也会失败。 &nbsp;&nbsp;<a href='http://www.blogjava.net/Werther/archive/2010/12/01/339555.html'>阅读全文</a><img src ="http://www.blogjava.net/Werther/aggbug/339555.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/Werther/" target="_blank">Werther</a> 2010-12-01 22:39 <a href="http://www.blogjava.net/Werther/archive/2010/12/01/339555.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>SVN使用技巧</title><link>http://www.blogjava.net/Werther/archive/2010/11/08/337506.html</link><dc:creator>Werther</dc:creator><author>Werther</author><pubDate>Mon, 08 Nov 2010 02:39:00 GMT</pubDate><guid>http://www.blogjava.net/Werther/archive/2010/11/08/337506.html</guid><wfw:comment>http://www.blogjava.net/Werther/comments/337506.html</wfw:comment><comments>http://www.blogjava.net/Werther/archive/2010/11/08/337506.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/Werther/comments/commentRss/337506.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/Werther/services/trackbacks/337506.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 程序员编写程序的过程中，每个程序都会有很多不同的版本，这就需要程序员很好的管理代码，在需要的时间可以取出需要的版本，并且每个版本都有一个完整的说明。&nbsp;&nbsp;<a href='http://www.blogjava.net/Werther/archive/2010/11/08/337506.html'>阅读全文</a><img src ="http://www.blogjava.net/Werther/aggbug/337506.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/Werther/" target="_blank">Werther</a> 2010-11-08 10:39 <a href="http://www.blogjava.net/Werther/archive/2010/11/08/337506.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>修改Tomcat的运行内存 &amp; JSP中查看当前的内存使用状况</title><link>http://www.blogjava.net/Werther/archive/2010/08/17/329067.html</link><dc:creator>Werther</dc:creator><author>Werther</author><pubDate>Tue, 17 Aug 2010 02:08:00 GMT</pubDate><guid>http://www.blogjava.net/Werther/archive/2010/08/17/329067.html</guid><wfw:comment>http://www.blogjava.net/Werther/comments/329067.html</wfw:comment><comments>http://www.blogjava.net/Werther/archive/2010/08/17/329067.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/Werther/comments/commentRss/329067.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/Werther/services/trackbacks/329067.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: -Xmx    Java Heap最大值，默认值为物理内存的1/4，最佳设值应该视物理内存大小及计算机内其他内存开销而定；<br><br>-Xms    Java Heap初始值，Server端JVM最好将-Xms和-Xmx设为相同值，开发测试机JVM可以保留默认值；<br><br>-Xmn    Java Heap Young区大小，不熟悉最好保留默认值；<br><br>-Xss    每个线程的Stack大小，不熟悉最好保留默认值；<br>&nbsp;&nbsp;<a href='http://www.blogjava.net/Werther/archive/2010/08/17/329067.html'>阅读全文</a><img src ="http://www.blogjava.net/Werther/aggbug/329067.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/Werther/" target="_blank">Werther</a> 2010-08-17 10:08 <a href="http://www.blogjava.net/Werther/archive/2010/08/17/329067.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>JAVA程序中也可能会发生内存泄露的问题</title><link>http://www.blogjava.net/Werther/archive/2010/07/06/325376.html</link><dc:creator>Werther</dc:creator><author>Werther</author><pubDate>Tue, 06 Jul 2010 08:27:00 GMT</pubDate><guid>http://www.blogjava.net/Werther/archive/2010/07/06/325376.html</guid><wfw:comment>http://www.blogjava.net/Werther/comments/325376.html</wfw:comment><comments>http://www.blogjava.net/Werther/archive/2010/07/06/325376.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/Werther/comments/commentRss/325376.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/Werther/services/trackbacks/325376.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要:  Java程序中也可能会发生内存泄露的问题，但是Java中引入了垃圾回收机制。这里所说的垃圾就是那些泄露的内存。<br>在Java语言中，没有引用句柄指向的类对象最容易成为垃圾。&nbsp;&nbsp;<a href='http://www.blogjava.net/Werther/archive/2010/07/06/325376.html'>阅读全文</a><img src ="http://www.blogjava.net/Werther/aggbug/325376.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/Werther/" target="_blank">Werther</a> 2010-07-06 16:27 <a href="http://www.blogjava.net/Werther/archive/2010/07/06/325376.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>谈优化JAVA程序开发，提高程序性能！</title><link>http://www.blogjava.net/Werther/archive/2010/07/06/325375.html</link><dc:creator>Werther</dc:creator><author>Werther</author><pubDate>Tue, 06 Jul 2010 08:12:00 GMT</pubDate><guid>http://www.blogjava.net/Werther/archive/2010/07/06/325375.html</guid><wfw:comment>http://www.blogjava.net/Werther/comments/325375.html</wfw:comment><comments>http://www.blogjava.net/Werther/archive/2010/07/06/325375.html#Feedback</comments><slash:comments>4</slash:comments><wfw:commentRss>http://www.blogjava.net/Werther/comments/commentRss/325375.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/Werther/services/trackbacks/325375.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要:  通过使用一些辅助性工具来找到程序中的瓶颈，然后就可以对瓶颈部分的代码进行优化。一般有两种方案：即优化代码或更改设计方法。我们一般会选择后者，因为不去调用以下代码要比调用一些优化的代码更能提高程序的性能。而一个设计良好的程序能够精简代码，从而提高性能。&nbsp;&nbsp;<a href='http://www.blogjava.net/Werther/archive/2010/07/06/325375.html'>阅读全文</a><img src ="http://www.blogjava.net/Werther/aggbug/325375.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/Werther/" target="_blank">Werther</a> 2010-07-06 16:12 <a href="http://www.blogjava.net/Werther/archive/2010/07/06/325375.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Java中的四个核心技术思想</title><link>http://www.blogjava.net/Werther/archive/2010/06/30/324868.html</link><dc:creator>Werther</dc:creator><author>Werther</author><pubDate>Wed, 30 Jun 2010 04:59:00 GMT</pubDate><guid>http://www.blogjava.net/Werther/archive/2010/06/30/324868.html</guid><wfw:comment>http://www.blogjava.net/Werther/comments/324868.html</wfw:comment><comments>http://www.blogjava.net/Werther/archive/2010/06/30/324868.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/Werther/comments/commentRss/324868.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/Werther/services/trackbacks/324868.html</trackback:ping><description><![CDATA[<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; font-family: 宋体; font-size: 14px; line-height: 25px; "><span class="Apple-tab-span" style="white-space:pre">	</span>JAVA已经成为一个庞大而复杂的技术平台，对于开发人员而言，要想更好的掌握JAVA技术，深入理解底层的技术处理细节必不可少。对核心概念和思想的掌握可以帮助我们举一反三、触类旁通，有助于提升我们对整个Java平台的理解力。这里所介绍的是Java技术平台的几个核心概念，其中所蕴含的思想有助于我们更深刻的理解Java技术。</p>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; font-family: 宋体; font-size: 14px; line-height: 25px; ">　　<strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; ">Java虚拟机</strong></p>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; font-family: 宋体; font-size: 14px; line-height: 25px; ">　　Java虚拟机的主要任务是装在class文件并且执行其中的字节码。Java虚拟机包含一个类装载器，它可以从程序和API中装载class文件。Java API中只有程序执行时需要的那些类才会被装载。字节码由执行引擎来执行。</p>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; font-family: 宋体; font-size: 14px; line-height: 25px; ">　　不同的Java虚拟机中，执行引擎可能实现得非常不同。在由软件实现的虚拟机中，最简单的执行引擎就是一次性解释字节码。另一种执行引擎更快，但是也更消耗内存，叫做"即时编译器(just-in-time compiler)"。在这种情况下，第一次被执行的字节码会被编译成本地机器代码。编译出的本地机器代码会被缓存，当方法以后被调用的时候可以重用。第三种执行引擎是自适应优化器。在这种方法里，虚拟机开始的时候解释字节码，但是会监视运行中程序的活动，并且记录下使用最频繁的代码段。程序运行的时候，虚拟机只把那些活动最频繁的代码编译成本地代码，其他的代码由于使用得不是很频繁，继续保留为字节码-由虚拟机继续解释它们。一个自适应的优化器可以使得Java虚拟机在80%~90%的时间里执行被优化过的本地代码，而只需要编译10%~20%的对性能有影响的代码。</p>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; font-family: 宋体; font-size: 14px; line-height: 25px; ">　　当Java虚拟机是由主机操作系统上的软件实现的时候，Java程序通过调用本地方法(native method)和主机交互。Java中有两种方法: Java方法和本地方法。Java方法是由Java语言编写，编译成字节码文件，存储在class文件中的。本地方法是由其他语言(比如c,c++或汇编语言)编写的，编译成何处理器相关的机器代码。本地方法保存在动态链接库中,格式是各个平台专有的。运行中Java程序调用本地方法时，虚拟机装载包含这个本地方法的动态库，并调用这个方法。本地方法是联系Java程序和底层主机操作系统的连接方法。</p>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; font-family: 宋体; font-size: 14px; line-height: 25px; ">　　通过本地方法，Java程序可以直接访问底层操作系统的资源。一个本地方法接口(Java Native Interface, JNI)-使得本地方法可以在特定主机系统的任何一个Java平台实现上运行。</p>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; font-family: 宋体; font-size: 14px; line-height: 25px; ">　　如果希望使用特定主机上的资源，它们又无法从Java API访问，那么可以写一个平台相关的Java程序来调用本地方法。如果希望保证程序的平台无关性，那么只能通过Java API来访问底层系统资源。</p>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; font-family: 宋体; font-size: 14px; line-height: 25px; ">　　<strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; ">类装载器的体系结构</strong></p>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; font-family: 宋体; font-size: 14px; line-height: 25px; ">　　一个Java应用程序可以使用两种类装载器："启动(bootstrap)"类装载器和用户定义的类装载器。启动类装载器(这是系统中唯一的)是Java虚拟机实现的一部分。启动类装载器通常使用某种默认方式从本地磁盘中装载类，包括Java API类(启动类装载器也被称为原始类装载器、系统类装载器或者默认类装载器)。</p>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; font-family: 宋体; font-size: 14px; line-height: 25px; ">　　Java应用程序能够在运行时安装用户定义的类装载器，这种类装载器能够使用自定义的方式来装载类。例如，从网络下载class文件。尽管启动类装载器是虚拟机实现的本质部分，而用户定义的类装载器不是，但用户定义的类装载器能够用Java来编写,能够被编译成class文件，能够被虚拟机装载，还能够像其它对象一样实例化。</p>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; font-family: 宋体; font-size: 14px; line-height: 25px; ">　　由于有用户定义类装载器，所以不必再编译的时候就知道运行中的Java应用程序中最终会加入的所有的类。用户定义的类装载器使得在运行扩展Java应用程序成为可能。当它运行时，应用程序能够解决它需要哪些额外的类，能够决定是使用一个或是更多的用户定义的类装载器来装载。由于类装载器是用Java编写的，所以用任何在Java代码中可以表述的风格来进行类装载。这些类可以通过网络下载，可以从某些数据库中获取，甚至可以动态生成。</p>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; font-family: 宋体; font-size: 14px; line-height: 25px; ">　　每一个类被装载的时候，Java虚拟机都监视这个类，看到它到底是被启动类装载器还是被用户定义类装载器装载。当被装载的类引用了另外一个类时，虚拟机就会使用装载第一个类的类装载器装载引用的类。例如，如果虚拟机使用一个特定的类装载器装载Volcano这个类，它就会使用这个类装载器装载Volcano类使用的所有类。</p>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; font-family: 宋体; font-size: 14px; line-height: 25px; ">　　由于Java虚拟机采取这种方式进行类的装载，所以被装载的类默认情况下只能看到被同一个类装载器装载的别的类。通过这种方法，Java的体系结构允许在一个Java应用程序中建立多个命名空间。运行时的Java程序中的每一个类装载器都有自己的命名空间。</p>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; font-family: 宋体; font-size: 14px; line-height: 25px; ">　　Java应用程序可以创建多少个(或多少种)被不同的类装载器装载的类存放在不同的命名空间中，它们不能相互访问，除非应用程序显示地允许这么做。当编写一个Java应用程序的时候，从不同源文件装载的类可以分隔在不同的命名空间中。通过这种方法，就能够使用Java类装载器的体系结构来控制任何不同源文件中装载的代码之间的相互影响，特别是能够阻止恶意代码获取访问或破坏善意代码的权限。</p>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; font-family: 宋体; font-size: 14px; line-height: 25px; ">　　Web浏览器是一个动态扩展的例子，Web浏览器使用用户定义的类装载器从网络下载用于Java applet的class文件。Web浏览器使用一个用来安装用户定义类装载器的Java应用程序。这个用户定义的类装载器通常被称为Java Applet类装载器，它知道如何向HTTP服务器请求class文件。Java Applet可以作为动态扩展的例子，因为Java应用程序并不知道它什么时候会开始从网络下载浏览器请求的class文件。只有当浏览器遇到有Java applet的页面时，才决定是否需要下载class文件。</p>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; font-family: 宋体; font-size: 14px; line-height: 25px; ">　　Web浏览器启动的Java应用程序通常为每个提供class文件的网络地址分别创建不同的用户定义类装载器，因此，不同的用户定义类装载器装载不同来源的class文件。这就可以把它们分别放置在Java主机应用程序的不同命名空间之下。由于不同来源的Java applet文件放置在不同的命名空间中，恶意的Java applet代码就不会直接访问从别的地方下载的class文件。这就能够限制或阻止不同来源的代码之间的相互访问。</p>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; font-family: 宋体; font-size: 14px; line-height: 25px; ">　　<strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; ">Java class文件</strong></p>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; font-family: 宋体; font-size: 14px; line-height: 25px; ">　　Java class文件主要在平台无关性和网络移动性方面使Java更适合网络。它在平台无关性方面的任务是：为Java程序提供独立于底层主机平台的二进制形式的服务。这种途径途径打破了C或者C++等语言所遵循的传统，使用这些传统语言写的程序通常首先被编译，然后被连接成单独的、专门支持特定硬件平台和操作系统的二进制文件。通常情况下，一个平台上的二进制可执行文件不能在其他平台上工作。而Java class文件时可以运行在任何支持Java虚拟机的硬件平台和操作系统上的二进制文件。</p>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; font-family: 宋体; font-size: 14px; line-height: 25px; ">　　当编译和连接一个C++程序时，所获得的可执行二进制文件只能在指定的硬件平台和操作系统上运行，因为这个二进制文件包含了对目标处理器的机器语言。而Java编译器把Java源文件的指令翻译成字节码，这种字节码就是Java虚拟机的"机器语言"。</p>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; font-family: 宋体; font-size: 14px; line-height: 25px; ">　　class文件设计得紧凑，因此它们可以快速地在网络上传送。其次，由于Java程序是动态连接和动态扩展的，class文件可以在需要的时候才下载。这个特点使得Java应用程序能够安排从网络上下载class文件的时间，从而可以最大限度地减少终端用户的等待时间。</p>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; font-family: 宋体; font-size: 14px; line-height: 25px; ">　　<strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; ">Java API</strong></p>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; font-family: 宋体; font-size: 14px; line-height: 25px; ">　　Java API通过支持平台无关性和安全性，使得Java适应于网络应用。Java API是运行库的集合，它提供了一套访问主机系统资源的标准方法。运行Java程序时，虚拟机装载程序的class文件所使用的Java API class文件。所有被装载的class文件(包括从应用程序中和从Java API中提取的)和所有已经装载的动态库(包含本地方法)共同组成了再Java虚拟机上运行的整个程序。</p>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; font-family: 宋体; font-size: 14px; line-height: 25px; ">　　在一个平台能偶支持Java程序以前，必须在这个特定平台上明确地实现API的功能。为访问主机上的本地资源，Java API调用了本地方法。由于Java API class文件调用了本地方法，Java程序就不需要再调用它们了。通过这种方法，Java API class文件为底层主机提供了具有平台无关性、标准接口的Java程序。对Java程序而言，无论平台内部如何，Java API都会有同样的表现和可预测的行为。正是由于在每个特定的主机平台上明确地实现了Java虚拟机和Java API,因此，Java程序自身就能够成为具有平台无关性的程序。</p>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; font-family: 宋体; font-size: 14px; line-height: 25px; ">　　Java API在Java安全性模型方面也有贡献。当Java API的方法进行任何有潜在危险的操作(比如进行本地磁盘写操作)之前，都会通过查询访问控制器来检验是否得到了授权。访问控制器是一个类，该类用来执行栈检验，已决定是否允许某种操作。</p>
<img src ="http://www.blogjava.net/Werther/aggbug/324868.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/Werther/" target="_blank">Werther</a> 2010-06-30 12:59 <a href="http://www.blogjava.net/Werther/archive/2010/06/30/324868.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>浅析jQuery框架与构造对象 </title><link>http://www.blogjava.net/Werther/archive/2010/05/05/320153.html</link><dc:creator>Werther</dc:creator><author>Werther</author><pubDate>Wed, 05 May 2010 14:50:00 GMT</pubDate><guid>http://www.blogjava.net/Werther/archive/2010/05/05/320153.html</guid><wfw:comment>http://www.blogjava.net/Werther/comments/320153.html</wfw:comment><comments>http://www.blogjava.net/Werther/archive/2010/05/05/320153.html#Feedback</comments><slash:comments>7</slash:comments><wfw:commentRss>http://www.blogjava.net/Werther/comments/commentRss/320153.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/Werther/services/trackbacks/320153.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 这是一些分析jQuery框架的文字 <br>    针对jQuery 1.3.2版本<br><br>    面向的读者应具备以下要求<br><br>    1.非常熟悉HTML<br>       2.非常熟悉javascript语法知识<br>    3.熟悉javascript面向对象方面的知识<br>    4.熟练使用jQuery框架&nbsp;&nbsp;<a href='http://www.blogjava.net/Werther/archive/2010/05/05/320153.html'>阅读全文</a><img src ="http://www.blogjava.net/Werther/aggbug/320153.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/Werther/" target="_blank">Werther</a> 2010-05-05 22:50 <a href="http://www.blogjava.net/Werther/archive/2010/05/05/320153.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>java中set map list的区别</title><link>http://www.blogjava.net/Werther/archive/2010/03/17/315664.html</link><dc:creator>Werther</dc:creator><author>Werther</author><pubDate>Wed, 17 Mar 2010 03:01:00 GMT</pubDate><guid>http://www.blogjava.net/Werther/archive/2010/03/17/315664.html</guid><wfw:comment>http://www.blogjava.net/Werther/comments/315664.html</wfw:comment><comments>http://www.blogjava.net/Werther/archive/2010/03/17/315664.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/Werther/comments/commentRss/315664.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/Werther/services/trackbacks/315664.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: set －－其中的值不允许重复，无序的数据结构 <br>list   －－其中的值允许重复，因为其为有序的数据结构 <br>map－－成对的数据结构，健值必须具有唯一性（键不能同，否则值替换） &nbsp;&nbsp;<a href='http://www.blogjava.net/Werther/archive/2010/03/17/315664.html'>阅读全文</a><img src ="http://www.blogjava.net/Werther/aggbug/315664.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/Werther/" target="_blank">Werther</a> 2010-03-17 11:01 <a href="http://www.blogjava.net/Werther/archive/2010/03/17/315664.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Struts框架学习方法的分享</title><link>http://www.blogjava.net/Werther/archive/2010/02/24/313793.html</link><dc:creator>Werther</dc:creator><author>Werther</author><pubDate>Wed, 24 Feb 2010 06:30:00 GMT</pubDate><guid>http://www.blogjava.net/Werther/archive/2010/02/24/313793.html</guid><wfw:comment>http://www.blogjava.net/Werther/comments/313793.html</wfw:comment><comments>http://www.blogjava.net/Werther/archive/2010/02/24/313793.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.blogjava.net/Werther/comments/commentRss/313793.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/Werther/services/trackbacks/313793.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要:    由于Struts框架在全球的广泛使用，学习它的人也非常之多，但是大部分人花费了太多不必要的时间和精力在一些不太重要的地方，导致学习代价高昂，成效也不是很好。我这里根据多年学习经验的总结，精心设计了一套学习Struts框架的曲线，让大伙学习Struts框架既快且准，节省大伙宝贵的时间，一定会对各位学习者大有帮助。&nbsp;&nbsp;<a href='http://www.blogjava.net/Werther/archive/2010/02/24/313793.html'>阅读全文</a><img src ="http://www.blogjava.net/Werther/aggbug/313793.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/Werther/" target="_blank">Werther</a> 2010-02-24 14:30 <a href="http://www.blogjava.net/Werther/archive/2010/02/24/313793.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Struts1.x 和 Struts2的不同之处。</title><link>http://www.blogjava.net/Werther/archive/2010/02/22/313575.html</link><dc:creator>Werther</dc:creator><author>Werther</author><pubDate>Mon, 22 Feb 2010 01:20:00 GMT</pubDate><guid>http://www.blogjava.net/Werther/archive/2010/02/22/313575.html</guid><wfw:comment>http://www.blogjava.net/Werther/comments/313575.html</wfw:comment><comments>http://www.blogjava.net/Werther/archive/2010/02/22/313575.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/Werther/comments/commentRss/313575.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/Werther/services/trackbacks/313575.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 一、Struts2 的简介<br><br>1.         虽然 struts2 号称是一个全新的框架,但是这仅仅是相对于 struts1 而言的. <br><br>2.         Struts2 和 struts1 相比,确实有很多革命性的改进,但是并不是新发布的新框架<br><br>3.         是另一个框架 WebWork 基础上发展起来的. <br><br>4.          Struts2 没有继承 struts1 的血统,而是继承 webWork 的血统. <br><br>5.         struts2是 WebWork 的升级,而不是一个全新的框架,稳定性和性能等各方面都有很好的保证<br><br>6.          而且吸收了 struts1 和 WebWork 两者的优势,因此是一个非常值得期待的框架<br>&nbsp;&nbsp;<a href='http://www.blogjava.net/Werther/archive/2010/02/22/313575.html'>阅读全文</a><img src ="http://www.blogjava.net/Werther/aggbug/313575.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/Werther/" target="_blank">Werther</a> 2010-02-22 09:20 <a href="http://www.blogjava.net/Werther/archive/2010/02/22/313575.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>项目失败的原因</title><link>http://www.blogjava.net/Werther/archive/2010/02/06/312184.html</link><dc:creator>Werther</dc:creator><author>Werther</author><pubDate>Sat, 06 Feb 2010 06:01:00 GMT</pubDate><guid>http://www.blogjava.net/Werther/archive/2010/02/06/312184.html</guid><wfw:comment>http://www.blogjava.net/Werther/comments/312184.html</wfw:comment><comments>http://www.blogjava.net/Werther/archive/2010/02/06/312184.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/Werther/comments/commentRss/312184.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/Werther/services/trackbacks/312184.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 一个软件项目从开始到结束，由于资源、人员、管理、方法学等等各方面的因素，往往不可避免的会存在一些问题，如需求不明确、项目管理失败、沟通问题等等，今天无意中看到老外写的关于这方面的一篇文章，总结的比较全面，翻译过来结合自己的一些经验做了点补充和修改，存档以备时常可以告诫一下自己。&nbsp;&nbsp;<a href='http://www.blogjava.net/Werther/archive/2010/02/06/312184.html'>阅读全文</a><img src ="http://www.blogjava.net/Werther/aggbug/312184.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/Werther/" target="_blank">Werther</a> 2010-02-06 14:01 <a href="http://www.blogjava.net/Werther/archive/2010/02/06/312184.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ExtJS 资料下载地址</title><link>http://www.blogjava.net/Werther/archive/2010/02/06/312183.html</link><dc:creator>Werther</dc:creator><author>Werther</author><pubDate>Sat, 06 Feb 2010 05:14:00 GMT</pubDate><guid>http://www.blogjava.net/Werther/archive/2010/02/06/312183.html</guid><wfw:comment>http://www.blogjava.net/Werther/comments/312183.html</wfw:comment><comments>http://www.blogjava.net/Werther/archive/2010/02/06/312183.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/Werther/comments/commentRss/312183.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/Werther/services/trackbacks/312183.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 轻松搞定 ExtJS <br>http://download.csdn.net/source/1801086 &nbsp;&nbsp;<a href='http://www.blogjava.net/Werther/archive/2010/02/06/312183.html'>阅读全文</a><img src ="http://www.blogjava.net/Werther/aggbug/312183.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/Werther/" target="_blank">Werther</a> 2010-02-06 13:14 <a href="http://www.blogjava.net/Werther/archive/2010/02/06/312183.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>电脑键盘快捷键</title><link>http://www.blogjava.net/Werther/archive/2010/02/03/311790.html</link><dc:creator>Werther</dc:creator><author>Werther</author><pubDate>Wed, 03 Feb 2010 04:52:00 GMT</pubDate><guid>http://www.blogjava.net/Werther/archive/2010/02/03/311790.html</guid><wfw:comment>http://www.blogjava.net/Werther/comments/311790.html</wfw:comment><comments>http://www.blogjava.net/Werther/archive/2010/02/03/311790.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/Werther/comments/commentRss/311790.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/Werther/services/trackbacks/311790.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 键盘上每个键作用<br>F1帮助 <br>F2改名 <br>F3搜索 <br>F4地址 <br>F5刷新 <br>F6切换 <br>F10菜单 &nbsp;&nbsp;<a href='http://www.blogjava.net/Werther/archive/2010/02/03/311790.html'>阅读全文</a><img src ="http://www.blogjava.net/Werther/aggbug/311790.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/Werther/" target="_blank">Werther</a> 2010-02-03 12:52 <a href="http://www.blogjava.net/Werther/archive/2010/02/03/311790.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>