Skip to Main Content

Java and JavaScript in the Database

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Help accessing classes in jar file loaded as a resource

362032Apr 12 2005 — edited Aug 22 2005
Hi.

I have a 3rd party jar file that I'm using to connect to an external web service.

If I load this jar file (and my java code) into the database via the loadjava utility, the java code all works as expected. However this particular jar file has over 4000 java classes and other misc files in it! The loadjava utility happily extracts all of these files into my schema, but I want to avoid this if possible. I noticed that the loadjava has a parameter called -jarasresource. I've loaded the jar file via this parameter and I see the jar in my schema as a java resource. However, my custom java code fails to compile as it doesn't seem able to find the java classes referenced inside this resource.

I'm pretty new to this, but the documentation mentions that all objects in my schema are treated as if I had specified the CLASSPATH environment variable. Am I missing something fundamental about how jar files work if loaded as a resource? Is my only option to cringe and load the 4000 plus files? If this is my only option, then I suppose I could load and extract the jar file into its own schema and then use the resolver options to point to this schema for my custom java code.

Any advice or suggestions in this matter would be greatly appreciated.

Thanks,
Alan Davey

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 19 2005
Added on Apr 12 2005
5 comments
1,810 views