eriezelagera

Initialization Class

Feb 19th, 2015
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.55 KB | None | 0 0
  1. public class ProjectName {
  2.  
  3.     public ProjectName() {
  4.         if (JINI4j.verify("path_to_config")) {
  5.             final SMSReceiver receiver = new SMSReceiver();
  6.             if (receiver.startGateway()) {
  7.                 receiver.execute();
  8.             } else {
  9.                 // Warning or exit the program
  10.             }
  11.         } else {
  12.             // Warning - config file not found or contains error, exit the program
  13.         }
  14.     }
  15.  
  16.     public static void main(String args[]) {
  17.         SwingUtilities.invokeLater(new Runnable() {
  18.                     @Override
  19.                     public void run() {
  20.                 new ProjectName();
  21.             }
  22.         )};
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment