Creating the OS X Java Application
Building the Java application for the OS X side wasn't difficult. I used the open source Eclipse product as the development environment for writing the code. It's a free, industrial-strength integrated development environment (IDE) worthy of an article all its own (see Figure 2).
Figure 2 Eclipse is an industrial-strength open source IDE.
I had to create four classes for the OS X file monitor application (see Figure 3), to be called EONPing (EON is the project's code name):
Class |
Description |
EONFileMonUI.java |
Displays the application's user interface, configuration code, and messaging architecture (see Figure 4). |
EONCaller.java |
Handles sending the HTTP messages to the ASP.NET web site, the URL of which is configured in the File Watcher dialog box. |
EONPing.java |
Contains the required Main() function that acts as the kickoff point for the entire Java application. EONPing really does nothing more than create an instance of the class EONFileMonUI. |
EONUtil.java |
Contains one function, getDateTime, which return a string indicating a specific date and time. |
Figure 3 The OS X File Watcher required the creation of four classes.
Figure 4 The File Watcher user interface.