Unfortunately the thread "Problem class not found" got lost during the recent Server Meltdown, and thread itself is not found
)
But since I came up with a solution, I will state the original problem, and follow that with a solution.
Problem: When the developer wants to add an optional class to his project that is only available in let's say BB version 4.2, but he wants his application to work on 4.1, so the assumed solution would be to put the call to that class in a try-catch, and compile it in JDE 4.2
For example if the developer wants to add the Blackberry Map Class to his project, which is only available in 4.2, he may want to do the following
try
{
MapsArguments args = new MapsArguments((Contact)contact ,0);
Invoke.invokeApplication( Invoke.APP_TYPE_MAPS, args);
}
catch (ClassNotFoundException e)
{
Dialog.notify("Your Device does not support this option");
}
The problem is that this does NOT work, because when you launch the application, JVM throws a ClassNotFoundException before the application runs, and you have no chance to catch it.
This was the original problem posted by someone, and there were quite a few replies, but with no solution. I will post a solution in the next Post.
Lionscribe