unbewusst.sein
8/18/2008 6:07:00 AM
Charles Oliver Nutter <charles.nutter@sun.com> wrote:
> The problem here is the Class.forName call. Class.forName will try to
> use the system classloader if nothing else is specified. Since the
> system classloader doesn't allow pulling in new JAR files after startup,
> we have a separate sub-classloader for JRuby.
>
> If you want to load the class, just reference it directly or try to
> import it.
>
> require 'jdbc/sqlite3'
> org.sqlite.JDBC # or import 'org.sqlite.JDBC'
>
> This will use the JRuby classloader which knows about the loaded JAR
> file. I tried this, and it works fine for me here.
>
> ? jruby -e "require 'rubygems'; require 'jdbc/sqlite3'; p org.sqlite.JDBC"
> Java::OrgSqlite::JDBC
OK, I'll try that, but, if i remember well, the same script was working
with 1.1.RC3 and not with 1.1.3.
--
Une Bévue