libConsole/Console.java
author Markus Bröker <mbroeker@largo.dyndns.tv>
Fri, 19 Nov 2010 12:23:24 +0100
changeset 158 2cddd4d26139
parent 134 8325a0fc22cd
permissions -rw-r--r--
removed unnecessary #includes committer: Markus Bröker <mbroeker@largo.homelinux.org>

import java.io.File;

public class Console {
    public static native int getch ();
    private static void help () {
        String p = System.getProperty ("java.library.path");
        String[] msg = p.split (File.pathSeparator);
        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 ();
        }
    };
}