java
文章平均质量分 52
iteye_9973
这个作者很懒,什么都没留下…
展开
-
Java初始化顺序
初始化(initialization)其实包含两部分:1.类的初始化(initialization class & interface)2.对象的创建(creation of new class instances)。因为类的初始化其实是类加载(loading of classes)的最后一步,所以很多书中把它归结为“对象的创建”的第一步。其实只是看问题...原创 2009-04-12 21:16:03 · 59 阅读 · 0 评论 -
volatile
Alternatively, a field may be declared volatile,in which case a thread must reconcile its working copy of the fieldwith the master copy every time it accesses the variable. Moreover,operat...原创 2009-04-12 22:17:21 · 65 阅读 · 0 评论 -
OGNL的用法
OGNL是通常要结合Struts 2的标志一起使用,如<s:property value="xx" />等。大家经常遇到的问题是#、%和$这三个符号的使用。下面我想通过例子讲述这个问题:首先新建名为Struts2_OGNL的Web工程,配置开发环境。之前很多朋友在使用Struts2的过程中都遇到乱码问题。当然乱码问题由来已久,而且涉及多方面的知识,所以并非三言两语可以说明白...原创 2009-04-14 10:39:05 · 85 阅读 · 0 评论 -
struts2 国际化乱码
开发工具:MyEclipse 6.01,所有的文件编码都设置为utf-8。所有过程正常开发结束后。将messagesource.propertis本地化:native2ascii messagesource.propertis messagesource_zh_CN.propertis运行,发现页面上从资源文件中读取的内容仍然为乱码。解决方法:本地化时指定编码方式即可,如下:na...原创 2009-11-17 13:02:21 · 64 阅读 · 0 评论 -
Runtime exec()调用shell脚本
有时,我们需要在java程序中调用外部程序,我们可用通过Runtime.exec()调用来完成。The class java.lang.Runtime features a static method called getRuntime(), which retrieves the current Java Runtime Environment. That is the o...原创 2009-06-13 17:23:59 · 189 阅读 · 0 评论 -
Error starting modern compiler
ant build error: 当Eclipse使用的编译用JVM和JAVA_HOME的指向不同时,在Eclipse中使用JAVAC进行编译,会导致Error starting modern compiler错误。原创 2009-06-21 16:31:41 · 120 阅读 · 0 评论