an Applet and back end to create the various
colourised listings you see all over my website. I released the source.
It consists of parsers for Java, HTML, SQL, XML, and BAT files that decide the
colours, and an Applet to display and scroll the
listings, and a macro preprocessor to either expand small listings as HTML
inline or generate an <applet invocation to an Applet
to display it.
If you can't see the listings, here are things to check:
- To use JDisplay to display listings on this website, you must have Java 1.5 or
later, preferably 1.6.0_06, installed
on your machine.
- If you are using Microsoft Internet Explorer, try another
browser. Seriously. Microsoft has taken great pains, over and over, to screw
up Java and every other mult-platform standardisation.
- If you are using Internet Explorer 7, you must allow blocked content
permission for Active X to run. This also gives permission to Java to run.
Click the Information bar, and then click Allow
blocked content. Unfortunately, this also allows dangerous ActiveX code
to run. However, you must do this in order to get access to perfectly-safe Java
Applets running in a sandbox. This is part of Microsoft’s war on Java. Don’t
put up with it! Use a different
browser.
- Check the Java console for
error messages. If you don't know how to interpret that message, feel free to
email me at
for
help.
- If you still can’t get the program working click HELP for more detail.
Get New Java
Get New Browser
Help
How It Works
JDisplay renders three different ways:
Inline
java.exe -version
With an iframe
With an Applet
If you don’t see anything, check out first that you can see Applets
in general by looking at
and my Applet
Collection, especially Wassup
which will tell you which Java version you have installed. If no Applets
work, try tracking down the problem with the help under JRE.
The JDisplay program is more complicated that you would imagine, so you you
probably don’t want to be bothered with it just to display a few listings.
I use static macros to generate the HTML, but you could generate it by hand.
JDisplay, Firewalls and MIME Types
If the problem is only with JDisplay, then likely
the problem is with your firewall interfering the JDisplay
getting its listing files. The files have the following mime types and
extensions:
| JDisplay file extensions and MIME types |
| Extension |
MIME type |
| ser |
application/x-java-serialized-object |
| bat |
text/plain |
| batfrag |
text/plain |
| java |
text/x-java-source |
| javafrag |
text/x-java-source |
| html |
text/html |
| htmlfrag |
text/html |
| sql |
text/plain |
| sqlfrag |
text/plain |
| xml |
application/xml |
| xmlfrag |
application/xml |
If *.ser files are blocked, you will not see anything.
If any of the others are blocked, the download button
will fail.
While you are at it, you might as well check the complete list of MIME
types to make sure you are not blocking any other critical kinds of file
downloads.
Improving the Look
JDisplay and my website in general were designed with certain fonts in mind. If
you don’t have them installed Java and your browser will substitute others,
which won’t have the same metrics which means it might not look right. I
suggest you install the following fonts:
| Suggested Fonts For Viewing Mindprod.com |
| Font |
Source |
Cost
|
| Bitstream
Vera Sans Mono |
gnome.org.
This is my primary monospaced font. |
free |
| Tiresias
PCFont Z |
Bitstream
MyFonts.com. A highly legible font. This is my
primary proportional font. |
. |
| Lucida
Console |
Comes with Windows. If you don’t have it, you can buy it, and any of
the other Lucida family from Ascender
Fonts |
|
| Lucida Sans |
C:\Program Files\java\jre1.6.0_06\lib\fonts\LucidaSansRegular.ttf
C:\Program Files\java\jre1.6.0_06\lib\fonts\LucidaSansDemiBold.ttf |
free |
| Lucida
Sans Typewriter |
C:\Program Files\java\jre1.6.0_06\lib\fonts\LucidaTypewriterRegular.ttf
C:\Program Files\java\jre1.6.0_06\lib\fonts\LucidaTypewriterBold.ttf |
free |
| Lucida
Bright |
C:\Program Files\java\jre1.6.0_06\lib\fonts\LucidaBrightRegular.ttf
C:\Program Files\java\jre1.6.0_06\lib\fonts\LucidaBrightDemiBold.ttf
C:\Program Files\java\jre1.6.0_06\lib\fonts\LucidaBrightItalic.ttf
C:\Program Files\java\jre1.6.0_06\lib\fonts\LucidaBrightDemiItalic.ttf |
free |
| Tiresias
Keyfont V2 |
download.
For labeling keycaps. |
free |
If the fonts or the displays look flea-bitten, make sure you have anti-aliasing
turned on.
Why JDisplay?
People have often asked me why I don’t just embed listings directly in my
web pages, perhaps decorated with CSS style tags instead of fooling around with
the JDisplay Applet. I do, I generate decorated HTML, but only for short
listings. I use <iframes for medium sized ones, and an Applet renderer for
long ones. For long ones, the data that the JDisplay Applet uses are much more
compact than the equivalent HTML. With JDisplay, a long listing takes up only a
small window on your screen. You an ignore it if you are not interested. Inline
listings would create a huge long document to scroll through.
If you don’t have Java at all, you should see a button to download the
listing to view in place of the listing. The problem comes when you have a
malfunctioning Java. Then you won’t see anything at all.
Further, I am a Java evangelist. In particular I want to see more client-side
Java computing. I think this 100% server logic talking to a browser, all the
rage these days, is so sixties. So I demonstrate it where I can on my site with
JDisplay, the CurrCon
currency displays, and the many amanuenses
Applets.