shheye的博客
shheye · 共 2 篇文章
Import Tomcat Source Code into Eclipse
1.Download Tomcat source code. 2.Create a new directory: basepath. 3.set #base.path from the file build.properties to the above basepath. 4.enter source code directory and ant. 5.after compiling successfully , you can make the two files(.project and .classpath) using executing the command: ant ide-…
2015-02-06 13:47 · TOMCAT · 评论(0)
transient和volatile
transient和volatile两个关键字一个用于对象序列化,一个用于线程同步,都是Java中比较高阶的话题,简单总结一下。 transient transient是类型修饰符,只能用来修饰字段。在对象序列化的过程中,标记为transient的变量不会被序列化。 示例: class Test { transient int a; // 不会被持久化 int b; // 持久化 } 当类Test的实例对象被序列化(比如将Test类的实例对象 t 写入硬盘的文本文件t.txt中),变量 a 的内容不会被保存,变量 b 的内容则会被保存。 参考: 把一个对象的表示转化为字节流的过程称为串行化(…
2014-04-29 16:45 · JAVASE · 评论(0)