Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » export question
export question [message #707468] Mon, 01 August 2011 17:39 Go to next message
Ravi Shankarappa is currently offline Ravi ShankarappaFriend
Messages: 3
Registered: January 2010
Junior Member
Hello,

I load a .png file and display it in a JPanel when my program (see below) starts.

     String pth = File.separator;
     String resource = "mySplash.png";
     String myImagePath=".";
     String imageFile = myImagePath+pth+resource;

     URL url = this.getClass().getResource(resource );
     image = javax.imageio.ImageIO.read(url);


When I run it within eclipse the png is displayed correctly. However, when I export my program and run the executable jar file it doesn't. How do I include the .png file in my jar file?
Re: export question [message #707552 is a reply to message #707468] Mon, 01 August 2011 19:56 Go to previous messageGo to next message
Michael Pellaton is currently offline Michael PellatonFriend
Messages: 289
Registered: July 2009
Senior Member
Hi

We do version control the .settings directory for the following reasons:
- We keep as much configuration as possible on the project level. A
workspace-level configuration of things like compiler settings,
formatter or auto save actions is not possible in our case as most of
our engineers work on different projects having different needs.
- We use Maven and some projects prefer m2eclipse and some the maven-
eclipse-plugin. Whether the .classpath files are checked in is
therefore a permanent discussion...
- In a large project we use the maven-eclipse-plugin not only to
configure the .classpath but also to add/ensure some config files
like jdt prefs. In that case we have a Hudson job doing the
eclipse:eclipse and a check-in regularly so that our team just
consumes the results.

Back to your questions: I think there is no final answer. It depends on
how your team wants to work and which other (build) tools you use.

Take care,
Michael
Re: export question [message #707553 is a reply to message #707552] Mon, 01 August 2011 19:56 Go to previous message
Michael Pellaton is currently offline Michael PellatonFriend
Messages: 289
Registered: July 2009
Senior Member
disregard - I posted the answer to the wrong question :-(
Previous Topic:Problem with p2 headless update with <no connection> case in eclipse 3.7
Next Topic:eclipse version
Goto Forum:
  


Current Time: Fri Mar 29 15:53:08 GMT 2024

Powered by FUDForum. Page generated in 0.05051 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top