2015-12-08から1日間の記事一覧

GroovyでScript実行時に複数のクラスがあるとエラー発生

ソース import static spark.Spark.* import groovy.json.JsonBuilder class A { def a = "test" def b = ['a':1, 'b': [111, 222, 333]] } class B { public static void main(String[] args) { Object.metaClass.asJson = { def builder = new JsonBuilder…

Groovyで外部プロセス起動して結果を読もうとすると処理が返ってこない事がある

execute().textを読み出そうとすると一部のコマンドで返ってこないことがある。 どうやらWindowsではストリーム詰まる問題が出ることがあるらしい www7164up.sakura.ne.jp 元ソース def runCommand(String command, String param) { def msg = [] def cmd = …