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

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -