This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
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.
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