[英]Setting classpath for org.jruby.Main?
I'm running JRuby as such: 我正在这样运行JRuby:
Main jrubyRunner = new Main()
jrubyRunner.main(sassCompileCommandLineArgs)
I have some gems I've compiled into jars. 我有一些宝石已编译到罐子中。 How do I include those jars on the classpath that
jrubyRunner
will use? 如何在
jrubyRunner
将使用的类路径中包含这些jar?
private static def setupCompassInvocationArgs =
['-e', "require 'rubygems';gem 'compass'; load Gem.bin_path('compass', 'compass')"]
protected def runCompassCommand(def compassArgs) {
Main main = new Main()
main.run([setupCompassInvocationArgs, compassArgs].flatten() as String[])
}
The first bit is what you need to load various gems. 首先,您需要加载各种宝石。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.