Created
October 11, 2010 04:26
-
-
Save ikikko/619968 to your computer and use it in GitHub Desktop.
g100pon #95 クラスパスの動的な変更
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// g100pon #95 クラスパスの動的な変更 | |
// 追加したいJarファイルとクラス名を指定する | |
def jarName = '*****.jar' | |
def className = '*****' | |
def loader = this.class.classLoader.rootLoader | |
loader.addURL(new File(jarName).toURL()) | |
loader.URLs.each{ println it } | |
def clazz = Class.forName(className).newInstance() | |
println clazz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment