2015年2月25日 星期三

Dbvisualizer 新增Sql Server 2005


1.      不同資料庫第一次連結時,要建立Driver Manager(設定JDBC)
2.      Tools】→【Driver Manager
3.      Name SQL Server 20005(自己想表示的)
4.      URL jdbc:jTDS
5.      Driver Classes
        1.      下方Driver File Paths User Specified 點選右邊資料夾圖示
        2.      選取該DB Driver jar 開啟
        3.      Driver Classes下拉選單選取Driver

2015年2月24日 星期二

DbVisualizer找不到jdk

下載最新的DbVisualizer 9.2.2後,一直無法開啟,官網上找到了相關的方案。

解決方法:

  1. Windows/Unix/Linux:
    1. In the DbVisualizer installation directory there is an .install4j directory,
    2. In this directory create a file named pref_jre.cfg if it doesn't already exist,
    3. Open the file in a text editor,
    4. Add the complete path to the root directory for the Java installation you want to use.
      Example: C:\Program Files\Java\jre7

2014年10月8日 星期三

Struts2

Struts2

jar
commons-fileupload-1.3.1.jar
commons-io-2.2.jar
commons-lang-2.4.jar
commons-lang3-3.1.jar
freemarker-2.3.19.jar
javassist-3.11.0.GA.jar
ognl-3.0.6.jar
struts2-core-2.3.16.3.jar
xwork-core-2.3.16.3.jar

將這些jar檔放置在 WEB-INF底下lib資料夾當中

2014年4月17日 星期四

Oracle Database

-- 建立新的TABLE
CREATE TABLE
    NEW1TABLE
    (
        AA NUMBER ,
        BB CHAR(1) ,
        CC VARCHAR2(10),
        DD CHAR(10)
    );

--變更TABLE名稱
ALTER TABLE NEW1TABLE RENAME TO FIRSTTABLE;

2011年8月27日 星期六

身分證字號驗證

public class idTest {
    private static int x=0, y=0;//轉換英文代表的數字

    public idTest(){
    }
    public static void main(String[] args) throws IOException {
        String id;
        char[] idChar;

        BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
        System.out.print("請輸入身分證字號:");

        id = buf.readLine();
        if(id.length() != 10){
            System.out.println("id長度錯誤。");
            System.exit(0);
        }

2011年8月21日 星期日

sort排序 練習

//sort排序
        int ary[] = {120,-10,-30,3,20,150,30,150};
        String temp = "";
        for(int i = 0;i <ary.length; i++){
            temp += ary[i]+"\t";
        }
        System.out.println("排序前的ary : "+temp);