﻿<?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-J2EE社区-随笔分类-review</title><link>http://www.blogjava.net/xcp/category/48796.html</link><description>&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;我也不在是我</description><language>zh-cn</language><lastBuildDate>Wed, 08 Jun 2011 21:51:50 GMT</lastBuildDate><pubDate>Wed, 08 Jun 2011 21:51:50 GMT</pubDate><ttl>60</ttl><item><title>九、java1.5以上新特性－Annotation</title><link>http://www.blogjava.net/xcp/archive/2011/06/06/351817.html</link><dc:creator>xcp</dc:creator><author>xcp</author><pubDate>Mon, 06 Jun 2011 10:12:00 GMT</pubDate><guid>http://www.blogjava.net/xcp/archive/2011/06/06/351817.html</guid><wfw:comment>http://www.blogjava.net/xcp/comments/351817.html</wfw:comment><comments>http://www.blogjava.net/xcp/archive/2011/06/06/351817.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/xcp/comments/commentRss/351817.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/xcp/services/trackbacks/351817.html</trackback:ping><description><![CDATA[1、Annotation 的由来<br />
&nbsp;&nbsp;&nbsp;&nbsp;a.不直接影响程序代码的语义，annotation可以从源文件，class文件或者以在运行时反射的多种方式读取<br />
&nbsp;&nbsp;&nbsp;&nbsp;b.类型标签javadoc<br />
&nbsp;&nbsp;&nbsp;&nbsp;c.因为property,xml的配置文件比较繁琐&nbsp;&nbsp;&nbsp;&nbsp;<br />
<br />
2、Annotation的定义方式<br />
&nbsp;&nbsp;&nbsp;&nbsp;a.Class,Interface,enum,Annotation是同级别的类标识符<br />
&nbsp;&nbsp;&nbsp;&nbsp;b.public <strong>@interface</strong> AnnotationTest{}&nbsp;&nbsp;&nbsp; <a>//@+interface</a> = annotation的定义哈<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public @interface AnnotationTest2{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>&nbsp;String value();&nbsp; //默认构造方法<br />
</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; public @interface AnnotationTest3{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String&nbsp;value1();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public @interface AnnotationTest4{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String[] value();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;
<div style="display: inline-block; "></div>
public @interface AnnotationTest5{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String value1();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String value2();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp; &nbsp;&nbsp;<br />
<br />
3、Annotation的使用方式<br />
&nbsp;&nbsp;&nbsp;&nbsp;<a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#97;&#46;&#64;&#65;&#110;&#110;&#111;&#116;&#97;&#116;&#105;&#111;&#110;&#84;&#101;&#115;&#116;">a.@AnnotationTest</a> 来使用就可以了；可以放在类，方法，属性上面；<br />
&nbsp;&nbsp;&nbsp;&nbsp;<a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#98;&#46;&#64;&#65;&#110;&#110;&#111;&#116;&#97;&#116;&#105;&#111;&#110;&#84;&#101;&#115;&#116;&#50;">b.@AnnotationTest2</a>("test")&nbsp; == @AnnotationTest2(value="test");<br />
&nbsp;&nbsp;&nbsp;&nbsp;<a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#99;&#46;&#64;&#65;&#110;&#110;&#111;&#116;&#97;&#116;&#105;&#111;&#110;&#84;&#101;&#115;&#116;&#51;">c.@AnnotationTest3</a>(value1="test3");<br />
&nbsp;&nbsp;&nbsp;&nbsp;<a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#100;&#46;&#64;&#65;&#110;&#110;&#111;&#116;&#97;&#116;&#105;&#111;&#110;&#84;&#101;&#115;&#116;&#52;">d.@AnnotationTest4</a>({"test1","test2"}); == @AnnotationTest4(<em><strong>value=({"test1","test2"})<br />
</strong></em>&nbsp; &nbsp; e.@AnnotationTest5(value1="hello",value2="world")<br />
<br />
4、jdk5.0以后自带的Annotation详解<br />
&nbsp;&nbsp;&nbsp;&nbsp;a.Override (重写)<br />
&nbsp;&nbsp;&nbsp;&nbsp;b.Deprecated (抛弃的，<span id="result_box" lang="zh-CN" class="short_text" closure_uid_ae5akh="70" ei="4" ec="undefined"><span title="点击可显示其他翻译" closure_uid_ae5akh="65">已过时</span></span>的)<br />
&nbsp;&nbsp;&nbsp;&nbsp;c.SuppressWarnings（压制警告，屏蔽警告）<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SuppressWarnings("unchecked"); //屏蔽一个警告<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SuppressWarnings({"<span style="color: red">unchecked</span>","<span style="color: red">deprecation</span>"})//屏蔽[多个]警告&nbsp;&nbsp;&nbsp;&nbsp; 注意<strong>{</strong>key1,key2<strong>}</strong>的使用，以数组的形式存放<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 有哪些常用的警告类型呢？<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;－》unchecked,deprecration,可自定义<br />
<br />
5、Annotation的高级特性&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;一、怎么来处理Annotation<br />
&nbsp;&nbsp;&nbsp;&nbsp;a.告知编译程序如何处理@<span style="color: red; "><strong>Retention</strong></span>(重要)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;java.lang.annotation.Retention型态可以在您定自定义Annotation型态时，指示编译程序应该如何对待你的自定义的Annotation型态--&gt;<span style="color: red">预设上编译程序会将Annotation信息留在[<strong>.class默认</strong>]档案中</span>，但不会被java虚礼机读取，<span style="color: #ff0000">而仅用于编译程序或工具程序运行时的提示信息</span>（目的）&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1)本身就是一个 注释类型 Retention<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2)用一个:&nbsp; RetentionPolicy value();属性 见jdk api<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3)<strong>RetentionPolicy</strong>是什么呢？它是一个枚举类型的注释保留策略：<a href="../../../java/lang/annotation/RetentionPolicy.html#CLASS"><strong><font face="Courier New">CLASS</font></strong></a><strong><font color="#ff0000">默认</font></strong>（编译器将把注释记录在类文件中，但在运行时 VM 不需要保留注释）、<a href="../../../java/lang/annotation/RetentionPolicy.html#RUNTIME"><strong><font face="Courier New">RUNTIME</font></strong></a>（编译器将把注释记录在类文件中，在运行时 VM 将保留注释，因此可以反射性地读取）、<a href="../../../java/lang/annotation/RetentionPolicy.html#SOURCE"><strong><font face="Courier New">SOURCE</font></strong></a>（编译器要丢弃的注释）&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4).例子<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font size="-1"><a title="java.lang.annotation 中的注释" href="../../java/lang/annotation/Target.html">@Target</a>(<a href="../../java/lang/annotation/Target.html#value()">value</a>={<a href="../../java/lang/annotation/ElementType.html#TYPE">TYPE</a>,<a href="../../java/lang/annotation/ElementType.html#FIELD">FIELD</a>,<a href="../../java/lang/annotation/ElementType.html#METHOD">METHOD</a>,<a href="../../java/lang/annotation/ElementType.html#PARAMETER">PARAMETER</a>,<a href="../../java/lang/annotation/ElementType.html#CONSTRUCTOR">CONSTRUCTOR</a>,<a href="../../java/lang/annotation/ElementType.html#LOCAL_VARIABLE">LOCAL_VARIABLE</a>})<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a title="java.lang.annotation 中的注释" href="../../java/lang/annotation/Retention.html">@Retention</a>(<a href="../../java/lang/annotation/Retention.html#value()">value</a>=<a href="../../java/lang/annotation/RetentionPolicy.html#SOURCE">SOURCE</a>)　　 &nbsp;== &nbsp;@Retention(<strong style="color: red; ">RetentionPolicy</strong>.SOURCE) //提供了一个策略类<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //就可以看出来，他主要就是压制警告，所以没有必要保存到class文件里面去<br />
</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public @interface <strong>SuppressWarnings{。。。}</strong>&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;5).RUNTIME时通过反射来得到Annotation相关的信息<br />
&nbsp; &nbsp; &nbsp; &nbsp; <strong>6</strong>).<span style="color: red; "><strong>AnnotatedElement </strong></span>就是提供反射处理annotation的接口,<span style="color: red; ">Class,constructor,Field,Method,Package</span>都实现了这个接口，然后我们在反射的时候可以先得到Class,Constructor,Method等对象再通过里面继承的
<div style="display: inline-block; "></div>
<div style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; display: inline-block; ">
<div style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">getAnnotation</div>
</div>
,getAnnotations,getDeclaredAnnotations,isAnnotationPresent方法画得到类，构造方法，方法，属性等前面的Annotation流程信息。<br />
&nbsp; &nbsp;&nbsp;<br />&nbsp; &nbsp;b.限定Annotation的使用对象-@<strong style="color: #ff0000; ">Target</strong>（重要）<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1).注释类型 <span style="color: #000000; ">Target</span>,方法：ElementType[] value<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;2).枚举 <span style="color: red; "><strong>ElementType</strong></span>:PACKAGE[包声明],TYPE[类、接口（包括注释类型）或枚举声明],ANNOTATION_TYPE[注释类型==annotation类里面可以定义],CONSTRUCTOR[构造方法],METHOD[方法],FIELD[字段声明（包括枚举常量）] &nbsp;,LOCAL_VARIABLE[局部变量声明] ,PARAMETER[参数声明]&nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;3).实例<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; @Retention(RetentionPolicy.RUNTIME)<br /><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; @Target({<div style="display: inline-block; "></div>ElementType.TYPE,<div style="display: inline-block; "></div>ElementType.METHOD,ELEMENTType.FIELD})<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public @interface AnnotationTest6{<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; String value();<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; c.子类是否继承父类的Annotation-<span style="color: red; "><strong>Inherited</strong></span><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1).注释类型 Inherited &nbsp; &nbsp; 声明的Annotation，</span><strong style="color: red; "><div style="display: inline !important; "><span>此元注释仅促成从超类继承注释；对已实现</span><span>接口的注</span><span style="color: #ff0000; ">释无效</span></div></strong><strong style="color: #ff0000; ">对接口起作用</strong><strong></strong><strong style="color: red; "><br /></strong>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<div style="display: inline-block; "></div><span class="Apple-style-span" style="font-family: monospace; white-space: pre; "><a title="java.lang.annotation 中的注释" href="">@Documented<br /></a></span><span class="Apple-style-span" style="font-family: monospace; white-space: pre; ">         </span><span class="Apple-style-span" style="font-family: monospace; white-space: pre; "><a title="java.lang.annotation 中的注释" href="http://www.blogjava.net/xcp/admin/EditPosts.aspx?postid=351817">@Retention</a></span><span class="Apple-style-span" style="font-family: monospace; white-space: pre; ">(</span><span class="Apple-style-span" style="font-family: monospace; white-space: pre; "><a href="">value</a></span><span class="Apple-style-span" style="font-family: monospace; white-space: pre; ">=</span><span class="Apple-style-span" style="font-family: monospace; white-space: pre; "><a href="http://www.blogjava.net/xcp/admin/EditPosts.aspx?postid=351817">RUNTIME</a></span><span class="Apple-style-span" style="font-family: monospace; white-space: pre; ">)</span><span class="Apple-style-span" style="font-family: monospace; white-space: pre; "><br /></span><span class="Apple-style-span" style="font-family: monospace; white-space: pre; ">         </span><span class="Apple-style-span" style="font-family: monospace; white-space: pre; "><a title="java.lang.annotation 中的注释" href="">@Target</a></span><span class="Apple-style-span" style="font-family: monospace; white-space: pre; ">(</span><span class="Apple-style-span" style="font-family: monospace; white-space: pre; "><a href="http://www.blogjava.net/xcp/admin/EditPosts.aspx?postid=351817">value</a></span><span class="Apple-style-span" style="font-family: monospace; white-space: pre; ">=</span><span class="Apple-style-span" style="font-family: monospace; white-space: pre; "><a href="">ANNOTATION_TYPE</a></span><span class="Apple-style-span" style="font-family: monospace; white-space: pre; ">)</span><span class="Apple-style-span" style="font-family: monospace; white-space: pre; "><br /></span><span class="Apple-style-span" style="font-family: monospace; white-space: pre; ">         public @interface </span><span class="Apple-style-span" style="font-family: monospace; white-space: pre; "><strong>Inherited</strong></span>&nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2).使用：如果我们在新建Annotation对象事，如果<strong>声明了<div style="display: inline-block; "></div>Inherited就会自动继承</strong>，反知则不继承<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 3).实例：<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; @Retention(RetentionPolicy.RUNTIME)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; @<div style="display: inline-block; "></div>Inherited<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public @interface AnnotationTest6{String value();}<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;@<div style="display: inline-block; "></div>AnnotationTest6("haha")<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public class Parent{}<br />&nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public class Child extends Parent{}<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 然后通过反射去查Child的所有Annotation<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br /><br />&nbsp; &nbsp;&nbsp;<div style="display: inline-block; "></div>d.利用反射得到Annotation信息[@Retention(value=RUNTIME)]<br />&nbsp; &nbsp; &nbsp; &nbsp; 1)用上面的实例：&nbsp;<div style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; display: inline-block; "></div>&nbsp;AnnotationTest5<br />&nbsp; &nbsp; &nbsp; &nbsp; 2)真正解析代码：&nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;public Class MyTest{<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; @AnnotationTest5(value1="hello",value2="world")<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public void output(){<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println("test annotation");<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;public class MyReflection{<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public static void main(String args[]){<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MyTest t = new MyTest();<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Class&lt;MyTest&gt; c = MyTest.class;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Class&lt;<div style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; display: inline-block; "></div>AnnotationTest5&gt; a = AnnotationTest5.class;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Method m = c.getMethod("output",new Class[]{});<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(m.isAnnotationPresent(a)){<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m.invoke(t,new Object[]{});<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //Annotation a1 = m.getAnnotation(a);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MyAnnotationTest5 t5 = &nbsp;<div style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; display: inline-block; "></div>m.getAnnotation(a);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(t5.value1);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(t5.value2);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;Annotation[] ans = m.<code><strong><a href="">getAnnotations</a></strong>();<br /></code><div style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for(Annotation an : ans){<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;System.out.println(an.annotationType().getName()); &nbsp; //但这就要看Annotation选择的那种生成策略:SOURCE,CLASS,RUNTIME[SuppressWarnings就不会显示出来]<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />6、应用<br />&nbsp; &nbsp; a.javadoc<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1)注释类型 <span style="color: red; "><strong>Documented</strong></span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;2)实例:一般我们产生javadoc的时候，没有把我们自定义的annotation显示显示出来，我们要怎么把我们写的annotation信息也显示在javadoc里面呢?<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; @Documented &nbsp; //这一句就是在生成javadoc的时候，如果遇到下面定义的annotation就要显示出来<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public @interface DocumentedAnnotation{<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; String value() default "test";<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br />&nbsp;&nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;public class DocumentedTest{<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/*<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* 测试生成javadoc<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*/<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;@<div style="display: inline-block; "></div>DocumentedAnnotation(value="welcome")<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public void testJavadoc(){<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;System.out.println("哈哈");<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;} &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}&nbsp;<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;点击myeclipse里面的project--&gt;generate javadoc-&gt;设置 就可以生成javadoc了</div><img src ="http://www.blogjava.net/xcp/aggbug/351817.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/xcp/" target="_blank">xcp</a> 2011-06-06 18:12 <a href="http://www.blogjava.net/xcp/archive/2011/06/06/351817.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>十、java1.5以上新特性－反射机制与动态代理</title><link>http://www.blogjava.net/xcp/archive/2011/06/06/351818.html</link><dc:creator>xcp</dc:creator><author>xcp</author><pubDate>Mon, 06 Jun 2011 10:12:00 GMT</pubDate><guid>http://www.blogjava.net/xcp/archive/2011/06/06/351818.html</guid><description><![CDATA[反射机制与动态代理 <img src ="http://www.blogjava.net/xcp/aggbug/351818.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/xcp/" target="_blank">xcp</a> 2011-06-06 18:12 <a href="http://www.blogjava.net/xcp/archive/2011/06/06/351818.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>八、java1.5以上新特性－ 静态导入包、不定参数</title><link>http://www.blogjava.net/xcp/archive/2011/06/06/351815.html</link><dc:creator>xcp</dc:creator><author>xcp</author><pubDate>Mon, 06 Jun 2011 09:59:00 GMT</pubDate><guid>http://www.blogjava.net/xcp/archive/2011/06/06/351815.html</guid><description><![CDATA[<p>一、静态包导入<br />&nbsp;&nbsp;&nbsp;&nbsp;1。比如多人一个类里面有很多的静态方法，而在另一个类里面使用的频率也比较的高，如ComUtil.add(...),ComUtil.update(...)等等，这样每次都要写ComUnitl.方法名，所以可以直接使用方法名吗？答案是肯定的<br />&nbsp;&nbsp;&nbsp;&nbsp;2。使用语法<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;import static com.ComUtil.add;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;import static com.ComUtil.update;<br />&nbsp;&nbsp;&nbsp;&nbsp;3。个人感觉没什么用<br /><br /><br />二、不定参数<br />&nbsp;&nbsp;&nbsp;&nbsp;public static&nbsp; int&nbsp; sum(int ... nums){<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int sum= 0;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for(int i=0;i&lt;nums.length;i++){<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;temp+=nums[i];<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return sum;<br />&nbsp;&nbsp;&nbsp;&nbsp;}</p><img src ="http://www.blogjava.net/xcp/aggbug/351815.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/xcp/" target="_blank">xcp</a> 2011-06-06 17:59 <a href="http://www.blogjava.net/xcp/archive/2011/06/06/351815.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>七、java1.5以上新特性－枚举</title><link>http://www.blogjava.net/xcp/archive/2011/06/06/351808.html</link><dc:creator>xcp</dc:creator><author>xcp</author><pubDate>Mon, 06 Jun 2011 06:48:00 GMT</pubDate><guid>http://www.blogjava.net/xcp/archive/2011/06/06/351808.html</guid><description><![CDATA[<div>1.枚举是jdk5.0以后的全新类，跟class,interface,annotation的级别一样；关键字enum。<br /><br />2.第一个实例　<br />&nbsp;&nbsp;&nbsp;&nbsp;public enum Color{ //定义<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Red,White,Blue;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public static void&nbsp;main(){<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Color xx = Color.Red;//使用<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />3.enum　提供的常用方法<br />&nbsp;&nbsp;&nbsp;&nbsp;//两个常用的静态方法 values(),valueOf()<br />&nbsp;&nbsp;&nbsp;&nbsp;for(Color c : c.values()){<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.println(c);<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />4.enum 的<span style="color: red">构造方法</span><br />&nbsp;&nbsp;&nbsp;&nbsp;publc enum Coin{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;penney(1),nickel(3),dime(10),quarter(25);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private int value;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public Coin(int value){<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.value=value;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public static void main(String args[]){<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Coin c = Coin.quarter;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.println(c.getValue());<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}　<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />5.enum的使用场所<br />&nbsp;&nbsp;&nbsp;&nbsp;权限控制、游戏方向、需要固定产生类对象的数量<br />&nbsp;&nbsp;&nbsp;&nbsp;</div><img src ="http://www.blogjava.net/xcp/aggbug/351808.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/xcp/" target="_blank">xcp</a> 2011-06-06 14:48 <a href="http://www.blogjava.net/xcp/archive/2011/06/06/351808.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>六、java1.5以上新特性－范型</title><link>http://www.blogjava.net/xcp/archive/2011/06/05/351778.html</link><dc:creator>xcp</dc:creator><author>xcp</author><pubDate>Sun, 05 Jun 2011 08:51:00 GMT</pubDate><guid>http://www.blogjava.net/xcp/archive/2011/06/05/351778.html</guid><description><![CDATA[<div>1。由来<br />&nbsp;&nbsp;&nbsp;&nbsp;ByteFoo-&gt;private Byte foo;<br />&nbsp;&nbsp;&nbsp;&nbsp;StringFoo-&gt;private String foo;<br />&nbsp;&nbsp;&nbsp;&nbsp;BooleanFoo-&gt;private boolean foo;<br />&nbsp;&nbsp;&nbsp;&nbsp;DateFoo-&gt;private Date foo;<br />&nbsp;&nbsp;&nbsp;&nbsp;XcpFoo-&gt;private xcp foo;<br /><br />2。1.4以前的解决方案<br />&nbsp;&nbsp;&nbsp;&nbsp;ObjectFoo-&gt;private Object foo; 　//容易出现ClassCastException，类型转换错误<br /><br />3。1.5新特性的解决方案－范型<br />&nbsp;&nbsp;&nbsp;&nbsp;public Class MyFoo&lt;T&gt;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private T foo;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />4。扩展<br />&nbsp;&nbsp;&nbsp;&nbsp;public Class MyFoo&lt;T&gt;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private T[] foos; //等等<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />5.再度扩展－限制范型使用类型<br />&nbsp;&nbsp;&nbsp;&nbsp;public Class MyFoo&lt;T <strong>extends</strong> List&gt;{&nbsp;//不管是继承父类与实现接口都用extends<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private T&nbsp;foo;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br /><br />6.再度扩展－类型通配声明--&gt;使用时的通用方法<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;Class MyFoo&lt;T extends List&gt;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private T foo;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;static void main(String args[]){<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MyFoo&lt;ArrayList&gt; foo1 = new MyFoo&lt;ArrayList&gt;();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MyFoo&lt;LinkedList&gt; foo2 = new MyFoo&lt;LinkedList&gt;();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//现在我想声明一个变量，即可以放ArrayList，也可以放LinkedList<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MyFoo<strong>&lt;? extends List</strong>&gt; foo3 =null;<span style="color: #ff0000">&nbsp; //list的子类</span><br />&nbsp;<span style="color: red">&nbsp;</span><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foo3 =&nbsp;new MyFoo&lt;ArrayList&gt;();</span><br /><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foo3 = new MyFoo&lt;LinkedList();</span><span style="color: red"><br /><br /></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MyFoo<strong>&lt;?&nbsp;super List</strong>&gt; foo4 =null; <span style="color: #ff0000">//list的父类</span><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foo4 = new MyFoo&lt;Object&gt;();&nbsp;&nbsp; //这就只能为Object了，因为List的超父类有Object<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MyFoo&lt;<strong>?</strong>&gt;&nbsp; foo5 = null;&nbsp;&nbsp;&nbsp;<span style="color: #ff0000"> //任意类型== ? extends&nbsp;Object</span><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foo5 = new MyFoo&lt;Integer&gt;();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foo5 = new MyFoo&lt;String&gt;();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;</div><img src ="http://www.blogjava.net/xcp/aggbug/351778.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/xcp/" target="_blank">xcp</a> 2011-06-05 16:51 <a href="http://www.blogjava.net/xcp/archive/2011/06/05/351778.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>五、java的Build path菜单</title><link>http://www.blogjava.net/xcp/archive/2011/06/05/351763.html</link><dc:creator>xcp</dc:creator><author>xcp</author><pubDate>Sat, 04 Jun 2011 18:04:00 GMT</pubDate><guid>http://www.blogjava.net/xcp/archive/2011/06/05/351763.html</guid><description><![CDATA[<p><img alt="" src="/Files/xcp/1.jpg" /><br /><br /><br /><strong>Link Source:&nbsp;&nbsp;&nbsp; 引进其它项目源代码(SOURCE)<br /></strong>New Source Folder: 新建一个资源文件夹<br />Use as Source Folder: <span id="result_box" lang="zh-CN" class="short_text" closure_uid_th021v="71" ei="4" ec="undefined"><span title="点击可显示其他翻译" closure_uid_th021v="65">使用</span><span title="点击可显示其他翻译" closure_uid_th021v="66">源文件夹</span></span>发布<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 对应--&gt;Remove from Build path(见图2)<br />Add External Archives: <span id="result_box" lang="zh-CN" class="short_text" closure_uid_th021v="71" ei="4" ec="undefined"><span title="点击可显示其他翻译" closure_uid_th021v="86">添加外部</span><span title="点击可显示其他翻译" closure_uid_th021v="87">档案</span></span><br /><strong>Add Libraries:&nbsp; </strong><strong><span id="result_box" lang="zh-CN" class="short_text" closure_uid_th021v="71" ei="4" ec="undefined"><span title="点击可显示其他翻译" closure_uid_th021v="90">添加库，引进其它公用jar(JAR)<br /></span></span><br />Configure Build path: <span id="result_box" lang="zh-CN" class="short_text" closure_uid_th021v="71" ei="4" ec="undefined"><span title="点击可显示其他翻译" closure_uid_th021v="97">配置</span><span title="点击可显示其他翻译" closure_uid_th021v="98">构建路径,可以动态　引进其它项目(PROJECT)</span></span></strong><br /><br /><span style="color: red">source,jar,pro</span>ject<br /><br /><br /><img alt="" src="/Files/xcp/2.jpg" /></p><img src ="http://www.blogjava.net/xcp/aggbug/351763.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/xcp/" target="_blank">xcp</a> 2011-06-05 02:04 <a href="http://www.blogjava.net/xcp/archive/2011/06/05/351763.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>四、java的打包jar,war,ear包的作用，区别，打包方式（本文打jar）</title><link>http://www.blogjava.net/xcp/archive/2011/06/05/351761.html</link><dc:creator>xcp</dc:creator><author>xcp</author><pubDate>Sat, 04 Jun 2011 17:44:00 GMT</pubDate><guid>http://www.blogjava.net/xcp/archive/2011/06/05/351761.html</guid><wfw:comment>http://www.blogjava.net/xcp/comments/351761.html</wfw:comment><comments>http://www.blogjava.net/xcp/archive/2011/06/05/351761.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/xcp/comments/commentRss/351761.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/xcp/services/trackbacks/351761.html</trackback:ping><description><![CDATA[<p style="text-indent: -21pt; margin: 0cm 0cm 0pt 21pt; mso-char-indent-count: 0; mso-list: l0 level1 lfo1" class="MsoListParagraph"><font face="Calibri"><span style="mso-bidi-font-family: 宋体; mso-bidi-theme-font: minor-fareast" lang="EN-US"><span style="mso-list: Ignore">一、</span></span><span lang="EN-US">java</span></font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">的打包</span><span lang="EN-US"><font face="Calibri">jar,war,ear</font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">包的作用，区别，打包方式</span><span lang="EN-US"><font face="Calibri">.</font></span></p>
<p style="text-indent: -21pt; margin: 0cm 0cm 0pt 42pt; mso-char-indent-count: 0; mso-list: l0 level2 lfo1" class="MsoListParagraph"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin" lang="EN-US"><span style="mso-list: Ignore"><font face="Calibri">a)</font><span style="font: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">作用与区别</span></p>
<p style="text-indent: -63pt; margin: 0cm 0cm 0pt 63pt; mso-char-indent-count: 0; mso-list: l0 level3 lfo1; mso-text-indent-alt: -21.0pt" class="MsoListParagraph"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin" lang="EN-US"><span style="mso-list: Ignore"><span style="font: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><font face="Calibri">i.</font><span style="font: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US"><font face="Calibri">jar: </font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">通常是开发时要引用通用</span><span lang="EN-US"><font face="Calibri">(JAVA)</font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">类，打成包便于存放管理</span></p>
<p style="text-indent: -63pt; margin: 0cm 0cm 0pt 63pt; mso-char-indent-count: 0; mso-list: l0 level3 lfo1; mso-text-indent-alt: -21.0pt" class="MsoListParagraph"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin" lang="EN-US"><span style="mso-list: Ignore"><span style="font: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><font face="Calibri">ii.</font><span style="font: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US"><font face="Calibri">war: </font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">是做好一个</span><span lang="EN-US"><font face="Calibri">(web)</font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">应用后，通常是网站，打成包部署到容器中</span></p>
<p style="text-indent: -63pt; margin: 0cm 0cm 0pt 63pt; mso-char-indent-count: 0; mso-list: l0 level3 lfo1; mso-text-indent-alt: -21.0pt" class="MsoListParagraph"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin" lang="EN-US"><span style="mso-list: Ignore"><span style="font: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><font face="Calibri">iii.</font><span style="font: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US"><font face="Calibri">ear: </font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">企业级应用，实际上</span><span lang="EN-US"><font face="Calibri">EAR</font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">包中包含</span><span lang="EN-US"><font face="Calibri">WAR</font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">包和几个企业级项目的配置文件而已，一般服务器选择</span><span lang="EN-US"><font face="Calibri">WebSphere</font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">等，都会使用</span><span lang="EN-US"><font face="Calibri">EAR</font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">包。通常是</span><span lang="EN-US"><font face="Calibri">EJB</font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">打成</span><span lang="EN-US"><font face="Calibri">ear</font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">包。</span></p>
<p style="text-indent: -21pt; margin: 0cm 0cm 0pt 42pt; mso-char-indent-count: 0; mso-list: l0 level2 lfo1" class="MsoListParagraph"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin" lang="EN-US"><span style="mso-list: Ignore"><font face="Calibri">b)</font><span style="font: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">打包方式</span></p>
<p style="text-indent: -63pt; margin: 0cm 0cm 0pt 63pt; mso-char-indent-count: 0; mso-list: l0 level3 lfo1; mso-text-indent-alt: -21.0pt" class="MsoListParagraph"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin" lang="EN-US"><span style="mso-list: Ignore"><span style="font: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><font face="Calibri">i.</font><span style="font: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">所有的包都是用</span><span lang="EN-US"><font face="Calibri">jar</font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">打的，只不过目标文件的扩展名不一样</span></p>
<p style="text-indent: -63pt; margin: 0cm 0cm 0pt 63pt; mso-char-indent-count: 0; mso-list: l0 level3 lfo1; mso-text-indent-alt: -21.0pt" class="MsoListParagraph"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin" lang="EN-US"><span style="mso-list: Ignore"><span style="font: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><font face="Calibri">ii.</font><span style="font: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">也可以用</span><span lang="EN-US"><font face="Calibri">Ant</font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">来安成构建</span></p>
<p style="text-indent: -21pt; margin: 0cm 0cm 0pt 42pt; mso-char-indent-count: 0; mso-list: l0 level2 lfo1" class="MsoListParagraph"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin" lang="EN-US"><span style="mso-list: Ignore"><font face="Calibri">c)</font><span style="font: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-family: 'simsun','serif'; mso-bidi-font-size: 10.5pt" lang="EN-US">JET</span><span style="font-family: 宋体; mso-ascii-font-family: simsun; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: simsun; mso-bidi-font-size: 10.5pt">编译成</span><span style="font-family: 'simsun','serif'; mso-bidi-font-size: 10.5pt" lang="EN-US">EXE</span></p>
<p style="text-indent: -63pt; margin: 0cm 0cm 0pt 63pt; mso-char-indent-count: 0; mso-list: l0 level3 lfo1; mso-text-indent-alt: -21.0pt" class="MsoListParagraph"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin" lang="EN-US"><span style="mso-list: Ignore"><span style="font: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><font face="Calibri">i.</font><span style="font: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US"><font face="Calibri">JET<span style="mso-spacerun: yes">&nbsp;&nbsp; </span></font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">是要用钱买的，而且据说</span><span lang="EN-US"><font face="Calibri"><span style="mso-spacerun: yes">&nbsp;&nbsp; </span>JET<span style="mso-spacerun: yes">&nbsp;&nbsp; </span></font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">也不是能把所有的</span><span lang="EN-US"><font face="Calibri"><span style="mso-spacerun: yes">&nbsp;&nbsp; </span>Java<span style="mso-spacerun: yes">&nbsp;&nbsp; </span></font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">程序都编译成执行文件，性能也要打些折扣。所以，使用制作可执行</span><span lang="EN-US"><font face="Calibri"><span style="mso-spacerun: yes">&nbsp;&nbsp; </span>JAR<span style="mso-spacerun: yes">&nbsp;&nbsp; </span></font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">文件包的方法就是最佳选择了，何况它还能保持</span><span lang="EN-US"><font face="Calibri"><span style="mso-spacerun: yes">&nbsp;&nbsp; </span>Java<span style="mso-spacerun: yes">&nbsp;&nbsp; </span></font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">的跨平台特性。</span></p><br /><br />二、实例<br /><br />方法一：我现在有test/A.java<br />&nbsp;&nbsp;&nbsp;&nbsp;道理虽然简单，但是在这过程中还是有很多细节需要注意的，哪一个细节注意不到，操作都不会成功。<br />
<div align="center">
<div style="border-bottom: #cccccc 1px solid; border-left: #cccccc 1px solid; padding-bottom: 4px; background-color: #eeeeee; padding-left: 4px; width: 98%; padding-right: 5px; font-size: 13px; word-break: break-all; border-top: #cccccc 1px solid; border-right: #cccccc 1px solid; padding-top: 4px">
<div align="left"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #0000ff">package</span><span style="color: #000000">&nbsp;test;<br /></span><span style="color: #0000ff">public</span><span style="color: #000000">&nbsp;</span><span style="color: #0000ff">class</span><span style="color: #000000">&nbsp;A{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff">public</span><span style="color: #000000">&nbsp;</span><span style="color: #0000ff">static</span><span style="color: #000000">&nbsp;</span><span style="color: #0000ff">void</span><span style="color: #000000">&nbsp;main(String&nbsp;args[]){<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.println(</span><span style="color: #000000">"</span><span style="color: #000000">test&nbsp;java</span><span style="color: #000000">"</span><span style="color: #000000">);<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}</span></div></div></div>&nbsp;&nbsp;&nbsp;&nbsp;写好后，保存为A.java，存在D:\Java\jdk1.6\test_jar\test\目录下面，打开cmd，进入这个目录，即D:\Java\jdk1.6\test_jar\test\然后用javac命令编译，会生成一个A.class文件，此时类的编写工作已经完成。<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;2，在D:\Java\jdk1.6\test_jar目录下新建一个文件夹META-INF，再新建mainclass.mf文件，在其中写入下面一行信息<br />&nbsp;&nbsp;&nbsp;&nbsp;Main-Class: com/hp/HelloWorld<br />&nbsp;&nbsp;&nbsp;&nbsp;这一句有两个注意的地方，首先行尾要有回车换行；其次&#8220;:&#8221;和&#8220;com&#8221;之间要有一个空格。<br />&nbsp;&nbsp;&nbsp;&nbsp;这一行信息的作用是标明主类。<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;3，最后就是生成jar包并测试了，在cmd中进入D:\Java\jdk1.6\test_jar目录，输入下列命令&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;jar cvfm test.jar META-INF/mainclass.mf test/A.class(<strong>这是指定文件，当然也可以test指向文件夹)<br /></strong>&nbsp;&nbsp;&nbsp;&nbsp;上述命令执行成功的话，会提示&#8220;标明清单（manifest）...&#8221;，<br />&nbsp;&nbsp;&nbsp;&nbsp;然后再在当前目录下输入java -jar test.jar 命令，可以看到&#8220;test java&#8221;。&nbsp;<br />&nbsp;<br /><br /><br />方法二：<br />&nbsp;&nbsp;&nbsp;&nbsp;用简单的jar -cvf test.jar&nbsp;&nbsp;&nbsp;&nbsp;test目录,jar会自动生成META-INF/mainclass.mf，我们只需要在里面去加一句&nbsp;Main-Class: com/hp/HelloWorld<br />就可以了<br /><br /><br /><br />方法三：myeclipse工具　（<strong>推荐</strong>）<br />&nbsp;&nbsp;&nbsp;&nbsp;右击项目--Export--Jar File-要选择Main-Class<br /><br />方法四：ant <br /><br /><br /><br /><br />同理：war包的构建方法也可以通过jar,myeclipse,ant来构建<img src ="http://www.blogjava.net/xcp/aggbug/351761.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/xcp/" target="_blank">xcp</a> 2011-06-05 01:44 <a href="http://www.blogjava.net/xcp/archive/2011/06/05/351761.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>二、Java的应用服务安装</title><link>http://www.blogjava.net/xcp/archive/2011/06/05/351759.html</link><dc:creator>xcp</dc:creator><author>xcp</author><pubDate>Sat, 04 Jun 2011 17:35:00 GMT</pubDate><guid>http://www.blogjava.net/xcp/archive/2011/06/05/351759.html</guid><description><![CDATA[<p style="text-indent: -21pt; margin: 0cm 0cm 0pt 21pt; mso-char-indent-count: 0; mso-list: l0 level1 lfo1" class="MsoListParagraph"><font face="Calibri"><span style="mso-bidi-font-family: 宋体; mso-bidi-theme-font: minor-fareast" lang="EN-US"><span style="mso-list: Ignore">一、</span></span><span lang="EN-US">Java</span></font><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">的应用服务安装</span></p>
<p style="text-indent: -21pt; margin: 0cm 0cm 0pt 42pt; mso-char-indent-count: 0; mso-list: l0 level2 lfo1" class="MsoListParagraph"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin" lang="EN-US"><span style="mso-list: Ignore"><font face="Calibri">a)</font><span style="font: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US"><font face="Calibri">Tomcat5,6,7</font></span></p>
<p style="text-indent: -21pt; margin: 0cm 0cm 0pt 42pt; mso-char-indent-count: 0; mso-list: l0 level2 lfo1" class="MsoListParagraph"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin" lang="EN-US"><span style="mso-list: Ignore"><font face="Calibri">b)</font><span style="font: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><font face="Calibri"><span style="letter-spacing: 0.4pt" lang="EN-US">Bea </span><span lang="EN-US">Weblogic8,9,10</span></font></p>
<p style="text-indent: -21pt; margin: 0cm 0cm 0pt 42pt; mso-char-indent-count: 0; mso-list: l0 level2 lfo1" class="MsoListParagraph"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin" lang="EN-US"><span style="mso-list: Ignore"><font face="Calibri">c)</font><span style="font: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US"><font face="Calibri">IBM Websphere</font></span></p>
<p style="text-indent: -21pt; margin: 0cm 0cm 0pt 42pt; mso-char-indent-count: 0; mso-list: l0 level2 lfo1" class="MsoListParagraph"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin" lang="EN-US"><span style="mso-list: Ignore"><font face="Calibri">d)</font><span style="font: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US"><font face="Calibri">JBoss</font></span></p>
<p style="text-indent: -21pt; margin: 0cm 0cm 0pt 42pt; mso-char-indent-count: 0; mso-list: l0 level2 lfo1" class="MsoListParagraph"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin" lang="EN-US"><span style="mso-list: Ignore"><font face="Calibri">e)</font><span style="font: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US"><font face="Calibri">Apusic Application Server</font></span></p>
<p style="text-indent: -21pt; margin: 0cm 0cm 0pt 42pt; mso-char-indent-count: 0; mso-list: l0 level2 lfo1" class="MsoListParagraph"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin" lang="EN-US"><span style="mso-list: Ignore"><font face="Calibri">f)</font><span style="font: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US"><font face="Calibri">Sun Application Server</font></span></p>
<p style="text-indent: -21pt; margin: 0cm 0cm 0pt 42pt; mso-char-indent-count: 0; mso-list: l0 level2 lfo1" class="MsoListParagraph"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin" lang="EN-US"><span style="mso-list: Ignore"><font face="Calibri">g)</font><span style="font: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US"><font face="Calibri">Oracle </font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">的</span><span lang="EN-US"><font face="Calibri"> Oracle9i/AS</font></span></p><img src ="http://www.blogjava.net/xcp/aggbug/351759.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/xcp/" target="_blank">xcp</a> 2011-06-05 01:35 <a href="http://www.blogjava.net/xcp/archive/2011/06/05/351759.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>三、Java的插件安装方式，插件开发，常插件，快捷键</title><link>http://www.blogjava.net/xcp/archive/2011/06/05/351760.html</link><dc:creator>xcp</dc:creator><author>xcp</author><pubDate>Sat, 04 Jun 2011 17:35:00 GMT</pubDate><guid>http://www.blogjava.net/xcp/archive/2011/06/05/351760.html</guid><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: MyEclipse常用快捷键+插件大全 （1）Ctrl+M切换窗口的大小（2）Ctrl+Q跳到最后一次的编辑处（3）F2当鼠标放在一个标记处出现Tooltip时候按F2则把鼠标移开时Tooltip还会显示即Show Tooltip Description。&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;F3跳到声明或定义的地方...&nbsp;&nbsp;<a href='http://www.blogjava.net/xcp/archive/2011/06/05/351760.html'>阅读全文</a><img src ="http://www.blogjava.net/xcp/aggbug/351760.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/xcp/" target="_blank">xcp</a> 2011-06-05 01:35 <a href="http://www.blogjava.net/xcp/archive/2011/06/05/351760.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>一、Java的开发环境安装；环境变量配置(略)</title><link>http://www.blogjava.net/xcp/archive/2011/06/05/351758.html</link><dc:creator>xcp</dc:creator><author>xcp</author><pubDate>Sat, 04 Jun 2011 17:34:00 GMT</pubDate><guid>http://www.blogjava.net/xcp/archive/2011/06/05/351758.html</guid><description><![CDATA[<p style="text-indent: -21pt; margin: 0cm 0cm 0pt 21pt"><span>一、</span>Java<span style="font-family: 宋体">的开发环境安装；环境变量配置</span>(<span style="font-family: 宋体">略</span>)</p><img src ="http://www.blogjava.net/xcp/aggbug/351758.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/xcp/" target="_blank">xcp</a> 2011-06-05 01:34 <a href="http://www.blogjava.net/xcp/archive/2011/06/05/351758.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>