connection = java.sql.DriverManager.getConnection
‘jdbc:sqlite:test.sqlite3’
begin
statement = connection.createStatement
begin
statement.executeUpdate(“insert into user values (‘test’, 7)”)
rs = statement.executeQuery(“select * from user”)
begin
puts “user\tpass”
while rs.next
puts ["#{rs.getString(1)}",
“#{rs.getString(2)}”].join("\t")
end
ensure
rs.close
end
ensure
statement.close
end
ensure
connection.close
end
There are no problems using jruby directly, but when I include the
script in jruby-complete.jar using “jar ufe myapp.jar
org.jruby.JarBootstrapMain jar-bootstrap.rb”, I always get an error when
I start it ( java -jar myapp.jar ):
NameError: missing class or uppercase package name (`org.sqlite.JDBC’)