Code Example 1 shows how to use the require keyword to reference or include both third-party and Java platform API libraries.
#Load Java platform and third-party API support using #JRuby 0.9.1 and later syntax. require 'java' require 'xml-apis-1.3.02.jar' #Third-party code ... org.w3c.dom.Element root = g.getRoot() svgdocument = impl.createDocument(svgNS, "svg", null) org.w3c.dom.Node node = svgdocument.importNode(root, true) ...
This code sample is from the article JRuby and the Java Platform.