package my.util; /** * This utility class contains methods that provide information about the * terminal device to which the Java virtual machine is connected. * * @author Franck van Breugel */ public class TeleTYpewriter { private TeleTYpewriter() {} static { System.loadLibrary("ttyutil"); } /** * Tests whether the Java virtual machine is connected to a terminal device. * * @return true if the Java virtual machine is connected to a terminal device, false otherwise. */ public static native boolean isTTY(); /** * Returns the name of the terminal device from which the Java virtual machine was launched. * * @return the name of the terminal device from which the Java virtual machine was launched. */ public static native String getTTYName(); }