Class.forName will return a Class> type object. The cast method will return the type parameter of Class. Thus, in this case it'll return a ? (Object) type object.
You should try:
Class strClass = (Class) Class.forName("java.lang.String");
String str = strClass.cast(object);
See also Class.cast()