> > > Check out URLClassLoader (or ClassLoader, and pick which one works best
> > > for your application) to create an object of the desired class, then
[quoted text clipped - 25 lines]
> Class.forName - see
> http://www.theserverside.com/tt/articles/content/dm_classForname/DynLoad.pdf
ok, now I am able to load the class! Sweet!
But it still doesn't run, because it cannot find the images stored in
the very same jar file....
the jar file is on the classpath, and I do use the
ClassLoader.getSystemResource(strFile) to read the file from the main
function... so why isn't it finding the images?
If I run the jar by itself, it runs perfectly. However when I run the
main class of that jar from another jar, it cannot find the images....
I hope its something simple to correct.... any ideas?
Jeff - 02 Oct 2006 00:08 GMT
> > > > Check out URLClassLoader (or ClassLoader, and pick which one works best
> > > > for your application) to create an object of the desired class, then
[quoted text clipped - 38 lines]
> main class of that jar from another jar, it cannot find the images....
> I hope its something simple to correct.... any ideas?
Try using URLClassLoader. With that you can specify exactly where the
loader should look for the class or info. You can test it to be sure it
finds it by using the findResource method.
tiewknvc9 - 02 Oct 2006 00:44 GMT
for those of you who have been searching for the answer..... do this!
cmd = "javaw -jar jar2.jar";
Process proc = Runtime.getRuntime().exec(cmd);
> > > > Check out URLClassLoader (or ClassLoader, and pick which one works best
> > > > for your application) to create an object of the desired class, then
[quoted text clipped - 38 lines]
> main class of that jar from another jar, it cannot find the images....
> I hope its something simple to correct.... any ideas?