PDA

View Full Version : Java Web Start



Anonymous
09-01-2002, 03:56 PM
Could JFreeReportResources.getIcon(String) be changed to something like this to make JFreeReport work under Java Web Start?

public static ImageIcon getIcon(String filename)
{
URL in = ClassLoader.getSystemResource(filename);

// Hack to make resource-loading work under Java Web Start
if (in == null)
in = JFreeReportResources.class.getResource('/' + filename);

if (in == null)
{
Log.debug ("Unable to load file: " + filename);
return new ImageIcon(new BufferedImage (BufferedImage.TYPE_INT_RGB, 1, 1));
}

Image img = Toolkit.getDefaultToolkit().getImage(in);
return new ImageIcon(img);
}

Anonymous
09-01-2002, 06:26 PM
Hi,

ths change is in the cvs since Jul-28, just checkout the latest sources from sourceforge's cvs to get Webstart working.

Have more fun,
said Thomas