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

  • Home
  • SEARCH
  • 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 8632561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:22:12+00:00 2026-06-12T09:22:12+00:00

My code is running fine in eclipse, but when I am trying to run

  • 0

My code is running fine in eclipse, but when I am trying to run the same code using Java web start, it automatically terminated and not able to call getResourceAsStream() method.

Here is the code

   public ImageIcon loadImageIcon ( String name ) throws IOException, FileNotFoundException {

      logger.info("entering resource loader class in loadimage icond method");
      logger.info("object is "+this);
      logger.info("class is "+this.getClass());
      logger.info("class loader is "+this.getClass().getClassLoader()+" object trying to load is "+name);
      InputStream in = this.getClass().getResourceAsStream( name ) ;
      logger.debug("loadimageicon:  loading image inside resource loader "+this.getClass().getResource(name).getPath());
      ImageIcon   returnImage = null ;
     if ( in != null ) {
         returnImage = new ImageIcon ( InputStreamLoader.load ( in ) ) ;
         in.close() ;
      } else
         throw new FileNotFoundException ( name ) ;
      return( returnImage ) ;
   }

and here are the logs

[2012-10-03 13:15:03,015] [Thread-21] INFO  com.test.nzna.shared.util.ResourceLoader  - object is com.ibm.nzna.shared.util.ResourceLoader@1b7f958
[2012-10-03 13:15:03,015] [Thread-21] INFO  com.test.nzna.shared.util.ResourceLoader  - class is class com.ibm.nzna.shared.util.ResourceLoader
[2012-10-03 13:15:03,015] [Thread-21] INFO  com.test.nzna.shared.util.ResourceLoader  - class loader is com.sun.jnlp.JNLPClassLoader@1bf68a9 object trying to load is Default\logon.gif

I repeat the code is running perfectly fine in eclipse.

  • 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-12T09:22:12+00:00Added an answer on June 12, 2026 at 9:22 am

    well I have found the answer of my problem, I was passing “File.separator” as a name of the image file which was causing it to not find the resource so I changed it to “/” and it started working again perfectly fine in eclipse and in java web start

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

Sidebar

Related Questions

I am facing this error while running my java application using Java Web Start.
I am programming in Java using Maven/Eclipse. I am able to run HtmlUnit fine
Code is running fine when commenting DELETE statement and trying with SELECT statement. Please
I'm trying to make this http://htmlparser.sourceforge.net/ code run in eclipse. There instructions are simply
I'm using Eclipse and Hibernate to develope a J2EE web app. When running/debugging the
I am installing inApp purchase in My app.Yesterday code was running fine and I
I had code that worked fine when running in the context of the main
My code is working fine without any errors when running in Netbeans. If I
I have a j2me midlet running on a cell phone. The code works fine,
I've been trying to get into C++ programming with Eclipse, but I'm having problems

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.