定期的なオペレーションに使っていたgroovy のscriptが動かない、、、。How can I access the path of the script file from within the script?
htmlunitに付属するxm-api.jarが何処かとぶつかっているみたいで、同様のトラブルはgoogle
すると結構見つかる。 バージョン(javaも含めて)によりclassが衝突を起こす、という事の
様で、「不要なパッケージを消す」事で対応している様です。 さー、cron起動のスクリプトの
classpathを何処で指定しようか、、、。(後で役立つかもしれないので)
scriptDir = new File(getClass().protectionDomain.codeSource.location.path).parent
scriptFile = getClass().protectionDomain.codeSource.location.path
println scriptDir
println scriptFile
0 件のコメント:
コメントを投稿