摘要: Unable to locate the Javac Compiler in:
C:\Program Files\Java\jre6\..\lib\tools.jar
Please ensure you are using JDK 1.4 or above and
not a JRE (the com.sun.tools.javac.Main class is required).
In most cases you can change the location of your Java
installation by setting the JAVA_HOME environment variable. 閱讀全文
摘要: It never fails to surprise me that so many developers are unaware that SimpleDateFormat is not thread-safe. It seems like almost all J2EE projects I work on have code that uses instance variables or static instance variables to store a SimpleDateFormat that is then used throughout the code base without any concurrency control. 閱讀全文
昨天一個(gè)項(xiàng)目中在寫ibatis中的sql語(yǔ)句時(shí),order by #field#, 運(yùn)行時(shí)總是報(bào)錯(cuò),后來(lái)上網(wǎng)查了查,才知道這里不該用#,而應(yīng)該用$,隨即查了下#與$的區(qū)別.
總結(jié)如下:
1.#是把傳入的數(shù)據(jù)當(dāng)作字符串,如#field#傳入的是id,則sql語(yǔ)句生成是這樣,order by "id",這當(dāng)然會(huì)報(bào)錯(cuò)..
2.$傳入的數(shù)據(jù)直接生成在sql里,如#field#傳入的是id,則sql語(yǔ)句生成是這樣,order by id, 這就對(duì)了.