
Originally Posted by
im2amit
You can try using a Try/Catch while creating an instance of any class from this API and you can assume it to be present on the platform if you succeed or if any exception is thrown you will get to know that its not present.
Hello Amithab,
You are taking about might be below snap of code
Code:
String jsrTest = "";
Class _tmpClass=null;
try {
_tmpClass = Class.forName("com.mascotcapsule.micro3d.v4.Graphics3D");
} catch (ClassNotFoundException e) {
}
if(_tmpClass!=null){
jsrTest = _tmpClass.getName();
}else{
jsrTest = null;
}
if(jsrTest!=null)
g.drawString("3DAPIv= "+jsrTest, 0, 0, 0);
else
g.drawString("3DAPI not Supported", 0, 0, 0);
Yes, we can come across. Thanks for your reply.
Amit