java - this.getClass().getClassLoader().getResourceAsStream()is not working in RCP product -
this.getclass().getclassloader().getresourceasstream(image_url) working when trying run rcp application eclipse. but, when running product, not running.
this.getclass().getclassloader().getresourceasstream() returns `null´. clue how solve this?
note: have tried solve using activator.getdefault().getbundle(). not working. seems activator.getdefault() = null means plugin not actiavted. tried put break point there. indeed plugin variable in null in activator.
what should do?
use filelocator:
bundle bundle = frameworkutil.getbundle(getclass()); inputstream = filelocator.openstream(bundle, new path("relative path"), false); other methods of filelocator give url instead of stream.
Comments
Post a Comment