カブロボをEclipse上で実行する方法2

http://d.hatena.ne.jp/muimy/20041018#1098116780
で、ロボットを実行する方法を書きましたが、
KabuRoboDriverを使うともっと簡単のようです。
ただし起動時にVM引数の指定(例:-Dkaburobo.home=C:\kaburobo)は必要です。
(他のオプションの処理もかけばいらないかも?)

package hoge;

import jp.kaburobo.driver.KabuRoboDriver;

public class Main {
    public static void main(String[] args) {
        KabuRoboDriver launcher = new KabuRoboDriver();
        launcher.start("hoge.MyRobot2");
    }
}


期間の指定もできるです。

public class Main {
    public static void main(String[] args) throws Exception{
        KabuRoboDriver launcher = new KabuRoboDriver();
        DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
        TimeZone.setDefault(TimeZone.getTimeZone("Asia/Tokyo"));
        Calendar startDate = new GregorianCalendar();
        Calendar endDate = new GregorianCalendar();
        startDate.setTime(dateFormat.parse("2004-04-01"));
        endDate.setTime(dateFormat.parse("2004-04-30"));
        launcher.setStartDate(startDate);
        launcher.setEndDate(endDate);
        launcher.start("hoge.MyRobot2");
    }
}