Never mind, I must have done something odd because the next time I tested it, #1 didn't work.
sorry. -----Original Message----- From: Jeff Fisher [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 17, 2002 11:40 AM To: JDJList Subject: [jdjlist] dynamic class loading Can one of you gurus please explain the following This works: Class c = Class.forName("String"); This gets "java.lang.ClassNotFoundException: String": String string = new String("String"); Class c = Class.forName(string); This works: String string = new String("java.lang.String"); Class c = Class.forName(string); Why would a the string literal work? It still gets turned into a String object, yet the actual variable instance only works on the fully qualified type name. Thanks Jeff To change your JDJList options, please visit: http://www.sys-con.com/java/list.cfm To change your JDJList options, please visit: http://www.sys-con.com/java/list.cfm
