".jar" Plugins to a WebObjects application?
".jar" Plugins to a WebObjects application?
- Subject: ".jar" Plugins to a WebObjects application?
- From: Andrew Lindesay <email@hidden>
- Date: Wed, 23 Jun 2004 13:54:48 +1200
Hello;
I'm trying to make it possible to write some wee ".jar" files which we
can use as plugins to a WebObjects application on a project to do some
specific job which isn't permanent to the project -- so we can rip it
out later without having it's code in the main project. The plugin
must be able to use EOF and access the models located in the
application's "ClassLoader" name space. I'm a bit confused about this.
My current strategy is to do this sort of thing within the
"Application" class' constructor...
java.net.URL pluginURL = new
java.net.URL("file:///Library/Java/Extensions/testplugin.jar");
java.net.URLClassLoader cl = new java.net.URLClassLoader(new
java.net.URL[] { pluginURL }, this.getClass().getClassLoader());
Class tipC = Class.forName("nz.co.xxxxxx.TestClass",false,cl);
tipC.newInstance();
...but it does this as I'm doing some EOF stuff from the constructor of
the object...
java.lang.NoClassDefFoundError: com/webobjects/eocontrol/EOQualifier
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:1610)
at java.lang.Class.getConstructor0(Class.java:1922)
at java.lang.Class.newInstance0(Class.java:278)
at java.lang.Class.newInstance(Class.java:261)
at nz.co.xxxxxx.Application.<init>(Application.java:121)
...
Can anybody shed some light on the matter?
cheers.
___
Andrew Lindesay
http://www.lindesay.co.nz/
021 47 0929
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.