Skip to content

Cannot "require" the classes in other jar files #13

@GoogleCodeExporter

Description

@GoogleCodeExporter
For the lua code below:
  javavm = require("javavm")
  javavm.create("-Djava.class.path=jnlua-0.9.6.jar;osql.jar")
  db = java.require("com.asql.core.DBConnection")

It will raise java.lang.ClassNotFoundException in 3rd line.
I've tried using URLClassLoader but it doesn't work. The available way is to 
copy all files in osql.jar into jnlua-0.9.6.jar.

The following examples would work fine, in this case, the DriverManger would 
indirectly refer to the drivers that defined in "ojdbc6.jar"
  javavm = require("javavm")
  javavm.create("-Djava.class.path=jnlua-1.0.2.jar;ojdbc6.jar")
  driver = java.require("java.sql.DriverManager")
  conn=driver:getConnection("jdbc:oracle:thin:@//localhost:1521/orcl","usr","pwd")


Original issue reported on code.google.com by hyee...@gmail.com on 24 Mar 2014 at 3:02

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions