a jar problem

well, I'm facing a problem with my jar

I was creating a digital clock application , I used the class loader to load a font that is not rgestered with my system and it runs perfectly from the netbeans , but when I build the jar it doesn't work as it says that there is a NullPointerException as the jar couldn't Identify my new font,please help me.

public Display(){

super("Digital Clock");

ClassLoader cl =ClassLoader.getSystemClassLoader();

is = cl.getResourceAsStream("Font/DIGITALDREAM.ttf");

try{

font = Font.createFont(java.awt.Font.TRUETYPE_FONT, is);//here the problem goes

}catch(Exception e){}

font=font.deriveFont(Font.BOLD,20f);

[1078 byte] By [mohamad.atef.khafagaa] at [2007-11-27 11:52:00]
# 1

use this InputStream in = this.getClass().getResourceAsStream("Font/DIGITALDREAM.ttf");

make sure you have Font/DIGITALDREAM.ttf in your jar file.

java_2006a at 2007-7-29 18:41:43 > top of Java-index,Desktop,Deploying...
# 2

thank you my friend ,I used your code and now it works, fine.

mohamad.atef.khafagaa at 2007-7-29 18:41:43 > top of Java-index,Desktop,Deploying...