This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Rust Web Development and have Bastian Gruber on-line!
See this thread for details.
Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Image doesnot get displayed in an Eclipse OSGi Project

Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have created an Eclipse OSGi project and in the code i am trying to a create a new ImageIcon using the following code

url =Myclass.class.getResource("/images/default.gif");
image = new ImageIcon("/images/default.gif");

I am trying to run the Eclipse plugin from the cmd prompt using the following cmd
%JAVA_HOME%\bin\java -jar org.eclipse.osgi_3.2.0.v20060601.jar

I have created an image folder with the image in the directory from where I am running the above cmd.

My application gets launched but the ImageIcon do not get displayed.

Can you please help me figure where I am goining wrong.

Thanks in Advance!
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic