libConsole/Console.java
author Markus Bröker <mbroeker@largo.dyndns.tv>
Wed, 26 May 2010 13:38:53 +0200
changeset 125 9c0fdc119939
parent 83 220d76d0d672
child 134 8325a0fc22cd
permissions -rw-r--r--
postgresql_db: check connection status During startup, check for a successfull connection to the db committer: Markus Bröker <mbroeker@largo.homelinux.org>

public class Console {
    public static native int getch ();
    private static void help () {
        String p = System.getProperty ("java.library.path");
        String[] msg = p.split (":");
        System.err.printf ("Console Error:%n");

        for (int i = 0; i < msg.length; i++)
            System.err.printf ("\t%s%n", msg[i]);
        System.exit (-1);
    };

    static {
        try {
            System.loadLibrary ("Console");
        } catch (UnsatisfiedLinkError ule) {
            System.err.println (ule.getLocalizedMessage ());
            help ();
        }
    };
}