KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > prevayler > demos > demo1 > Main


1 package org.prevayler.demos.demo1;
2
3 import org.prevayler.Prevayler;
4 import org.prevayler.PrevaylerFactory;
5
6 import java.io.*;
7
8
9 public class Main {
10
11     public static void main(String JavaDoc[] args) throws Exception JavaDoc {
12         printMessage();
13         Prevayler prevayler = PrevaylerFactory.createPrevayler(new NumberKeeper(), "demo1");
14         new PrimeCalculator(prevayler).start();
15     }
16
17
18     static private void printMessage() throws Exception JavaDoc {
19         System.out.println("\nRobustness Reminder: You can kill this process at any time.\nWhen you restart the system, you will see that nothing was lost.\nPress Enter to continue.\n");
20         (new BufferedReader(new InputStreamReader(System.in))).readLine();
21     }
22
23 }
24
Popular Tags