  public class Foo {
      public static boolean doSomething() {
          try {
              Bar b = new Bar();
              return true;
          } catch (NoClassDefFoundError x) {
              return false;
          }
      }
  }
