随笔分类 -  Java

How to install JDK on Linux (RHEL5.*)
摘要:1. Download jdk installation file from http://www.oracle.com/technetwork/java/javase/downloads/index.html. a) If the file you download is rpm file, you can use command [rpm -i *.rpm] to startinstalling it. b) If it's bin file, you can use command [./*.bin] to startinstalling it. Then you can fi. 阅读全文
posted @ 2011-10-19 13:40 Forest Wang 阅读(169) 评论(0) 推荐(0)
关于线程的一道Java题
摘要:下面是一段有关Java线程的题目。 以下是一个Java类的代码:1publicclassTest{23inta=0;4intb=0;5intx=0;6inty=0;78publicstaticvoidmain(String[]args)throwsInterruptedException{9Testtest=newTest();10test.run();11}1213privatevoidrun()throwsInterruptedException{14Threadth1=newThread(){15publicvoidrun(){16a=1;17y=b;18}19};20th1.st... 阅读全文
posted @ 2011-09-30 09:38 Forest Wang 阅读(243) 评论(0) 推荐(0)
How to change a normal struts2 project to support multi-language
摘要:You can do it step by step as follow.Step 1, Detect if the encoding of the project is UTF-8. If not, change its encoding to UTF-8.Step 2, Add configuration in struts' config file[src/struts.xml]. <constant name="struts.custom.i18n.resources" value="messageResource" /> & 阅读全文
posted @ 2010-10-19 17:51 Forest Wang 阅读(656) 评论(0) 推荐(0)