Jay,
When using Class.forName with just the name of the class that you want to
load, you will be using the primordial ClassLoader which only knows about
the system classpath. What you probably want to do is use one of the
overloaded Class.forName methods that allows you to supply the ClassLoader
to use:
Object o = Class.forName("ClassName", true,
getClass().getClassLoader()).newInstance()
This will supply the ClassLoader of the current object (your servlet) to be
used to resolve the class.
Hope this helps,
Karl.
-----Original Message-----
From: Jay Walters [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 12, 2000 1:32 PM
To: JRun-Talk
Subject: Classpath for war file
I am having some problems loading classes from the <appname>/WEB-INF/classes
and <appname>/WEB-INF/lib directories. From the log files these are on my
classpath, but when trying to load classes using Class.forName() for example
I can't find the classes unless they are in servers/<servername>/lib. Any
ideas on this? I'm running JRun 3.0 on Windows 2K.
Cheers
----------------------------------------------------------------------------
--
Archives: http://www.egroups.com/group/jrun-interest/
Unsubscribe:
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/jrun_talk
or send a message to [EMAIL PROTECTED] with 'unsubscribe'
in the body.
------------------------------------------------------------------------------
Archives: http://www.egroups.com/group/jrun-interest/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/jrun_talk
or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the
body.