Accessing custom font from Jar
<p>I am going to use custom font in my application. For that I am using <code>Font.createFont()</code> method.
My code is given below. It works fine when I run my main class using command </p>

<blockquote>
  <p>java myAppl.class</p>
</blockquote>

<p>The font file is in same directory that of my class file. But when I bundled all files and font files in JAR and then run my application from JAR, the custom font do not loaded. Why?</p>

<pre><code>InputStream is = this.getClass().getResourceAsStream("myfont.TTF");
uniFont=Font.createFont(Font.TRUETYPE_FONT,is);
Font f = uniFont.deriveFont(24f);
</code></pre>

<p>What should I do?</p>
