摘要: 1.下載- ref : https://glassfish.dev.java.net/downloads/v2.1-b60e.html
-
2.解壓下載的jar # java -Xmx256m -jar glassxxx.jar
3.復制到安裝的路徑下 copy th glassfish to /opt/glasfish2.1
# cd glassfish2.1
如果系統(tǒng)沒安裝ant # chmod -R +x lib/ant/bin
make sure tomcat is not running on 8080, I changed to run on 18080
4. 安裝 # lib/ant/bin/ant -f setup.xml
cannot move the dir after the above step.
ends results:
create.domain:
[exe
閱讀全文
posted @
2009-06-13 12:11 冰是沒有未來的,因為它的永恒|
編輯 收藏
摘要: http://mxsfengg.javaeye.com/?show_full=true
http://clayz.javaeye.com/?page=2&show_full=true
http://mxsfengg.javaeye.com/blog/277913
閱讀全文
posted @
2009-06-03 11:55 冰是沒有未來的,因為它的永恒|
編輯 收藏
摘要: http://ditu.google.com/maps/geo?output=json&oe=utf-8&q=要查的地址
/**
* a positive response:
*
*
{
"name": "上海金橋開發(fā)區(qū)",
"Status": {
"code": 200,
"request": "geocode"
},
"Placemark": [
{
"id": "p1",
"address": "中國上海市浦東新區(qū)金橋開發(fā)\r\r\n區(qū)",
"AddressDetails": {
"Country": {
"CountryNameCode": "CN",
"
閱讀全文
posted @
2009-06-03 09:57 冰是沒有未來的,因為它的永恒|
編輯 收藏
摘要: PgAdmin, open up the SQL window by clicking the SQL button (the one with the pencil).
Choose “File ? Open…” and navigate to
C:\Program Files\PostgreSQL\8.3\share\contrib\lwpostgis.sql
Press the “Run” button. (The green triangle.) The lwpostgis.sql file will execute, loading the PostGIS functions and objects into the “postgis” database.
Choose “File ? Open…” and navigate to
C:\Program Files\PostgreSQL\8.3\share\contrib\spatial_ref_sys.sql
閱讀全文
posted @
2009-06-03 09:55 冰是沒有未來的,因為它的永恒|
編輯 收藏
摘要: netbeans項目中缺省使用 utf-8. 這要求所有的源文件使用 utf8 編碼有些源文件是從別的文件系統(tǒng)中拷貝出來, 可能使用別的編碼方式, 例如 iso-8859-1. 如果其中有 Ascii 擴展字符, 則 編譯的時候會抱怨有 并不認識的 unicode 編碼. (ummapped unicode characters)
解決方法: 使用 GNU iconv 工具進行批處理轉換.
- iconv 在 cygwin 中有發(fā)布, 需要 iconv2 包. 也有單獨的 windows 版本.
- 在 一個臨時文件目錄兩種建立和源目錄相同的目錄結構: 拷貝過去以后, find . -name "*.*" | xargs rm, find . -name ".svn" | xargs rm -R
- 在源文件目錄中: $ for a in `find . -name "*.java"`; do iconv -f iso-8859-1 -t utf-8 <"$a" > /tmp/"$a" ; done
閱讀全文
posted @
2009-06-03 09:52 冰是沒有未來的,因為它的永恒|
編輯 收藏
摘要: JTS Geometry 對象不能被 JAXB 映射成xml.
可使用一下的方法避免指定的 java bean property 不被 xml 話
在 bean 的class級別:
@XmlAccessorType(XmlAccessType.FIELD) // for jaxb to ananlyze the object
然后在 field 上面
@XmlTransient
如果沒有 XmlAccessorType, 則需要把 @XmlTransient 放在getter 上面.
閱讀全文
posted @
2009-06-03 09:44 冰是沒有未來的,因為它的永恒|
編輯 收藏
摘要: 1. putty:
http://the.earth.li/~sgtatham/putty/latest/x86/pscp.exe
2.使用 rsync, 能后進行差額同步, 大大減少文件傳輸量, 例如下面的命令本地的 dist 目錄下面的 TakeoutServer.war 同步到遠程服務器 etch1 的 ~ 目錄 (home 目錄)
rsync -avz --delete --progress -e "ssh" dist/TakeoutServer.war etch1:~/
閱讀全文
posted @
2009-05-22 16:55 冰是沒有未來的,因為它的永恒|
編輯 收藏
摘要: 數(shù)據(jù)庫映射為實體:http://resources.visual-paradigm.com/index.php/dbm-tut/42-tut/129-db-reverse-sc.html
實體映射為數(shù)據(jù)庫:http://resources.visual-paradigm.com/index.php/dbm-tut/42-tut/129-db-reverse-sc.html
閱讀全文
posted @
2009-05-22 10:24 冰是沒有未來的,因為它的永恒|
編輯 收藏
摘要: 1. log4j的配置
### direct log messages to stdout ###
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
### direct messages to file hibernate.log ###
#log4j.appender.file=org.apache.log4j.FileAppender
#log4j.appender.file.File=hibernate.log
#log4j.appender.file.layout=or
閱讀全文
posted @
2009-05-14 14:45 冰是沒有未來的,因為它的永恒|
編輯 收藏
摘要:
JDBC 驅動程序支持通過 integratedSecurity 連接字符串屬性在 Windows 操作系統(tǒng)上使用“類型 2”集成身份驗證。
注意:如果您運行 32 位的 Java 虛擬機 (JVM),則使用 x86 文件夾中的 sqljdbc_auth.dll 文件,即使操作系統(tǒng)是 x64 版本也不例外。如果您在 x64 處理器上運行 64 位 JVM,則使用 x64 文件夾中的 sqljdbc_auth.dll 文件。如果您在 Itanium 處理器上運行 64 位 JVM,則使用 IA64 文件夾中的 sqljdbc_auth.dll 文件。
例子:
1. java代碼:
public class DBConnect {
static {
try {
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDri
閱讀全文
posted @
2009-05-11 14:44 冰是沒有未來的,因為它的永恒|
編輯 收藏