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 7498213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T19:23:17+00:00 2026-05-29T19:23:17+00:00

When I export my code as runnable JAR from eclipse all the files that

  • 0

When I export my code as runnable JAR from eclipse all the files that I’ve set it to grab such as button images and other files are missing even though they are actually in the JAR. I’ve added getClass().getResource in front of the files but then when I try to run the JAR nothing even happens, any suggestions?

  • 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-05-29T19:23:18+00:00Added an answer on May 29, 2026 at 7:23 pm

    Seems like you not putting your stuff in the right sense. In order to make it work, follow these steps :

    1. Right-Click your Project in Project Explorer Tree.
    2. Go to New -> Source Folder and then provide any Name to the Source Folder.
    3. Now manually add your stuff to this Source Folder so created by you, like if you want to add images then make a New Folder, by manually visiting this Source Folder through File System.
    4. Name this New Folder as images and copy your images to this Folder.
    5. Now go back to your Eclipse IDE and Refresh your Project from the Project Explorer, by Right Clicking your Project, here you be able to see your added content now after refreshing.

    Now in order to access, say any image, you will use.

    getClass().getResource("/images/yourImageName.extension");
    

    which will return one URL object. Do remember the first forward slash, in this case, since whatever is inside your Source Folder is accessed with the help of this, in simpler terms. Now when you will Run your project, the content of this Source Folder will be automatically added to the bin folder and when you will create a Runnable Jar, then the stuff inside your Source Folder can be accessed as it is.

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

Sidebar

Related Questions

I'm trying out the Eclipse Java 'Export Runnable JAR file. It creates a single
I am trying to use the following code to export tables from access to
I would like to export my code from the working svn copy while including
I'm using the following code to export PNG file from the active PPT file.
I am using the following VBA code to export PPT slides to images. The
Does anyone know a way to export the VBA code from a number of
I have Java application and I export it to runnable .jar application. Can I
I am using the following code to export a dataset from c# to excel.
Running Apache/PHP on this PC. I am using Eclipse >> Export Java > JAR
I'm using the following code to export all the emails in a specific gmail

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.