Edit: always getting null pointer exception for Platform.getBundle("some_plugin_id")

143 Views Asked by At
private void checkDependencyInBundle() throws Exception {


    try { 
      Bundle bundle = Platform.getBundle("plugin name from Maniftst.MF file mentioned in Bundle-Symbolic name");


      System.out.println("From checkDependency Method:::" + bundle);
    }
    catch (Exception e) {
      e.printstacktrace();
    }


  }

// Pleas help if possible

//Hi All added the stacktrace below

/* java.lang.NullPointerException at org.eclipse.core.internal.runtime.InternalPlatform.getBundles(InternalPlatform.java:232) at org.eclipse.core.internal.runtime.InternalPlatform.getBundle(InternalPlatform.java:222) at org.eclipse.core.runtime.Platform.getBundle(Platform.java:1424) */

0

There are 0 best solutions below