java - Eclipse - Can't get file in "res" directory -
i know sort of question has been asked numerous times, i'm having trouble retrieving file teh res folder in eclipse rcp plugin. 1 thing i've noted if print absolute path root file (new file(".")), says i'm in eclipse folder location , not workspace reason. default workspace location seems set this, i'm thinking part of issue because when new file("res/somefile.txt") lookin in eclipse location , not plugin right?
thanks greg's comment above used below code file after injkecting in bundle.
ipath path = new path("res/icons/preferences.gif"); url url = filelocator.find(bundle, path, null); url iconurl = filelocator.tofileurl(url); image image = new image(parent.getdisplay(), iconurl.getpath());
Comments
Post a Comment