def require_jars!
        require 'jruby'

        # ask marc-marc4j gem to load the marc4j jars
        MARC::MARC4J.new(:jardir => settings['marc4j_reader.jar_dir'])

        # For some reason we seem to need to java_import it, and use
        # a string like this. can't just refer to it by full
        # qualified name, not sure why, but this seems to work.
        java_import "org.marc4j.converter.impl.AnselToUnicode"

        unless defined? Java::net.sourceforge.jtds.jdbc.Driver
          jtds_jar_dir = settings["jtds.jar_path"] || File.expand_path("../../vendor/jtds", File.dirname(__FILE__))

          Dir.glob("#{jtds_jar_dir}/*.jar") do |x|
            require x
          end

          # For confusing reasons, in normal Java need to
          # Class.forName("net.sourceforge.jtds.jdbc.Driver")
          # to get the jtds driver to actually be recognized by JDBC.
          #
          # In Jruby, Class.forName doesn't work, but this seems
          # to do the same thing:
          Java::net.sourceforge.jtds.jdbc.Driver
        end

        # So we can refer to these classes as just ResultSet, etc.
        java_import java.sql.ResultSet, java.sql.PreparedStatement, java.sql.Driver
    end
def require_jars!
        require 'jruby'

        # ask marc-marc4j gem to load the marc4j jars
        MARC::MARC4J.new(:jardir => settings['marc4j_reader.jar_dir'])

        # For some reason we seem to need to java_import it, and use
        # a string like this. can't just refer to it by full
        # qualified name, not sure why, but this seems to work.
        java_import "org.marc4j.converter.impl.AnselToUnicode"

        unless defined? Java::net.sourceforge.jtds.jdbc.Driver
          jtds_jar_dir = settings["jtds.jar_path"] || File.expand_path("../../vendor/jtds", File.dirname(__FILE__))

          Dir.glob("#{jtds_jar_dir}/*.jar") do |x|
            require x
          end

          # For confusing reasons, in normal Java need to
          # Class.forName("net.sourceforge.jtds.jdbc.Driver")
          # to get the jtds driver to actually be recognized by JDBC.
          #
          # In Jruby, Class.forName doesn't work, but this seems
          # to do the same thing:
          Java::net.sourceforge.jtds.jdbc.Driver
        end

        # So we can refer to these classes as just ResultSet, etc.
        java_import java.sql.ResultSet, java.sql.PreparedStatement, java.sql.Driver
    end
We ignore the iostream even though we get one, we're gonna
 read from a Horizon DB!
 Requires marc4j and jtds, and java_import's some classes.