Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Use getRootLoader().addUrl([Some URI])

See How to get a RootLoader
See RootLoader javadoc

Sample: Dynamic JDBC Driver Loading

Code Block
import Groovy.sql.Sql 
this.class.classLoader.rootLoader.addURL( new URL("file:///d:/drivers/ojdbc14.jar") )
def driver="oracle.jdbc.driver.OracleDriver";
def sql = Sql.newInstance("jdbc:oracle:thin:@hostname:port:schema", "scott", "tiger", driver);