public class Main
{
public static boolean doesClassExist(String name)
{
try
{
Class c = Class.forName(name);
if (c != null)
return true;
}
catch (ClassNotFoundException e)
{
// Class not found
}
catch (Exception e)
{
e.printStackTrace();
}
return false;
}
}
Saturday, September 15, 2012
Verifying in Runtime that dose the class exists within a program
Subscribe to:
Post Comments
(
Atom
)