Skip to content

Swing Application failed to load imageicons when launched from Robot #44

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
GoogleCodeExporter opened this issue Apr 6, 2015 · 6 comments

Comments

@GoogleCodeExporter
Copy link

Hi,

When a Swing application launched from Robot Framework, it fails to locate
the images bundled inside the application jar. 

But when the image icon is stored locally in the Robot Test libraries
folder (where jvmconnector located), the SUT could load the image icon when
launched from Robot.

This has been observed in automating JWS as well in classic (locally
installed) Swing application.

Below is the excerpt of the statement loads the image icon part of the
Swing Application

-------------------------------------------------------
ClassLoader cl = CfUtil.class.getClassLoader();
if (cl != null) {
    url = cl.getResource(resPath);
} else {
    url = ClassLoader.getSystemResource(resPath);
}
}
return new ImageIcon(url, iconName);
------------------------------------------------------

The issue looks to be the Robot (jvmconnector, swing library etc.)
creates/has a separate java Classloader which overrides the class search
path of Application Classloader.

Please help me in resolving this issue.

Thanks.

With regards
Arul

Original issue reported on code.google.com by [email protected] on 20 Apr 2010 at 4:08

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant