Java/BlackBerry build error overriding too many classes

Posted by behrk2 on Stack Overflow See other posts from Stack Overflow or by behrk2
Published on 2010-03-31T05:43:30Z Indexed on 2010/03/31 5:53 UTC
Read the original article Hit count: 453

Filed under:
|
|
|
|

Hey everyone,

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

© Stack Overflow or respective owner

Related posts about java

Related posts about blackberry