Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7869093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T01:12:28+00:00 2026-06-03T01:12:28+00:00

In my rcp plugin i want when i export my plugin to create a

  • 0

In my rcp plugin i want when i export my plugin to create a folder, lets say images in the exported folder. eg my exported folder now has configuration, p2, plugins and workspace folders. I want a default folder there to store images and can referee from inside the plugin.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T01:12:31+00:00Added an answer on June 3, 2026 at 1:12 am

    You are maybe going about this slightly incorrectly; you can package your images inside your plugin and then easily access them from code. Just create your image folder inside your plugin project and then select that folder on the “Binary Build” pane of the Build Configuration page of the plugin.xml editor.

    You can then manage your images via a cache like this:

    public class ImageCache 
    {
        private static ImageCache s_instance = new ImageCache();
        private ImageRegistry m_imageRegistry = Activator.getDefault().getImageRegistry();
    
        public static enum AppImage
        {
            EXAMPLE("images/example.gif")
            ;
    
    
            public String location;
    
            private AppImage(String location)
            {
                this.location = location;
            }
        }
    
        private ImageCache()
        {
                for(AppImage image : AppImage.values())
                {               
                    imageRegistry.put(image.name(),Activator.getImageDescriptor(image.location));
                }
        }
    
        public static ImageCache instance()
        {       
            return s_instance;
        }
    
        public final static Image get(AppImage key)
        {
                return instance().m_imageRegistry.get(key.name()); 
        }
    
        public final static ImageDescriptor getDescriptor(AppImage key)
        {
                return instance().m_imageRegistry.getDescriptor(key.name()); 
        }    
    }
    

    Where example.gif is in an images folder under the root of your plugin project.

    See also: http://www.vogella.com/articles/EclipseRCP/article.html#tips_loadimages
    and: http://obscuredclarity.blogspot.co.uk/2009/10/add-image-to-eclipse-rcp-application.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to make the build process for my Eclipse RCP plugin fully automatic.
I am currently developing a Java RCP with Eclipse RCP which has a plugin.xml
When I create an RCP application plugin project and choose the Hello RCP template
Afternoon, I'm working on an Eclipse RCP plugin. I want to embed a Swing
I want to create an Eclipse RCP from our collection of already existing Eclipse
I have an Eclipse RCP plugin that requires a DLL. What is the recommended
how do i solve this: I have usercredential informtion in my main RCP plugin.
with my RCP program I have the problem that I want to have more
I'm writing an RCP application plug-in. I want to make a set of objects
I want to use LWJGL in an Eclipse RCP application, but either using the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.