Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
GoogleCodeExporter opened this issue Mar 12, 2015 · 0 comments
Open

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

GoogleCodeExporter opened this issue Mar 12, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

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 [email protected] on 24 Mar 2014 at 3:02

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant