If you were using Groovy and Groovy Shell you could be using the Grape infrastructure.
#!/usr/bin/env groovy
@Grab( 'log4j:log4j:1.2.14' )
import org.apache.log4j.Level
import org.apache.log4j.Logger
def log
#javadoc #from #annotation #groovy #this
https://stackoverflow.com/questions/1...
https://stackoverflow.com/questions/1...