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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T05:58:42+00:00 2026-05-14T05:58:42+00:00

Has anyone ever heard of overriding too many classes in Java? Perhaps this issue

  • 0

Has anyone ever heard of overriding too many classes in Java? Perhaps this issue is just related to BlackBerry development, but I was wondering if it is an issue in Java, too.

Let’s say I have the following:

LabelField lblTitle = new LabelField(title) {
    protected void paint(Graphics graphics) {
        graphics.setColor(0x00FFFFFF);
        graphics.clear();
        super.paint(graphics);
    }
};

LabelField lblSubTitle = new LabelField(releaseYear + ", " + rating) {
    protected void paint(Graphics graphics) {
        graphics.setColor(0x00FFFFFF);
        graphics.clear();
        super.paint(graphics);
    }
};

This code works. However, I’ve noticed that by overriding the paint() method multiple times in many different classes throughout my project, I receive the error:

I/O Error: Cannot run program "jar": CreateProcess error=2, The system cannot find the file specified

My only solution thus far is to clean up my GUI code…minimize it and reuse it. Perhaps its good that this happened so I can be less careless about creating GUI code all over my classes.

Anyways, I was just wondering if anyone has heard of this before. If you are interested in reading more about the issue I have been facing, check out the following link:

BlackBerry Java Development Forums

  • 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-14T05:58:43+00:00Added an answer on May 14, 2026 at 5:58 am

    It is unlikely that the number of times you override paint() yields the error you’re reporting. It seems that the error is due to a build (compilation) error which prevents the jar from being created. You should therefore try and take a closer look at the error messages reported by your compiler/build tool.

    If this does not work, you can try to find the cause of the error by “divide and conquer”, as follows: comment out all places where your override paint(). If the problem disappears, uncomment half of these overrides and try again. If the problem comes back comment half of this half (and continue recursively). Otherwise, If the problem is still gone, comment back the 1st half and uncomment the 2nd half (and continue recursively).

    Even if you have many places where you override paint(), this type of binary search will converge quite quickly. For example, if paint() was overridden 256 times you only need eight recursive iterations to find out the one that is causing the problem.

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

Sidebar

Related Questions

No related questions found

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.