How do I get the name of the "className" initialized here from another class (both in the same package)? Class.forname("className").newInstance(); getClass().getName() gets the name of the class loaded. Thanks.
Peter den Haan
posted 16 years ago
Not sure what exactly you are asking... but are you looking for the class literal? TheClass.class.getName() will return "your.package.TheClass" and will instantiate TheClass if passed as argument to Class.forName(). - Peter