FileDocCategorySizeDatePackage
SimpleServer.javaAPI DocExample707Thu Nov 08 00:23:34 GMT 2001com.ora.rmibook.chapter21.printer.applications

SimpleServer

public class SimpleServer extends Object implements NetworkConstants

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

        try {
            File logfile = new File("C:\\temp\\serverLogfile");
            OutputStream outputStream = new FileOutputStream(logfile);
            Printer printer = new SynchronizedPrinter(outputStream);

            Naming.rebind(DEFAULT_PRINTER_NAME, printer);
        } catch (Exception e) {
            e.printStackTrace();
        }