## Working with the Hyades EMF Common Base Event v1.0.1 Sample

Introduction
This sample demonstrates creating and configuring Common Base Events. Users experience creating and configuring a Common Base Event using the Common Base Event XML file template Event Factory and logs the newly created Common Base Event to the console.
Contents
The contents of the sample include the Java source code, dependencies and configuration file necessary to create and configure a Common Base Event.
Requirements
JRE 1.4.0 or above is required to compile and execute this sample.
Assumptions

1. <workspace> represents the absolute path to the workbench's workspace.
2. The 'HyadesEMFCommonBaseEventv101Sample.event.xml.file' environment variable is set to the sample's configuration template's (HyadesEMFCommonBaseEventv101Sample.event.xml) absolute path and name. For example, <workspace>/HyadesEMFCommonBaseEventv101Sample/config/HyadesEMFCommonBaseEventv101Sample.event.xml, where <workspace> is the absolute path to the workbench's workspace.

Dependencies
The JAR files that are listed in the table are required to execute this sample:

JAR file | Plug-in it is contained in | Reason for requirement
hlcore.jar | org.eclipse.hyades.logging.core | Common Base Event's Hyades Logging Core dependency
hlcbe101.jar | org.eclipse.hyades.logging.core | Common Base Event implementation
ecore.jar | org.eclipse.emf.ecore | Common Base Event's Eclipse Modeling Framework (EMF) dependency
common.jar | org.eclipse.emf.common | Common Base Event's Eclipse Modeling Framework (EMF) dependency

Execution Steps
To run this sample , follow these steps:

1. If the workbench's default JRE is not 1.4.0 or above, modify the newly created Java project to compile and execute using JRE 1.4.0 or above. To add the JRE 1.4.0 to the Java Build Path:
   1. Right-click on HyadesEMFCommonBaseEventv101Project and select Properties.
   2. Select Java Build Path from the list in the left pane.
   3. Under the Libraries tab, select JRE_LIB and click the Remove button.
   4. Click the Add Library button.
   5. In the Add Library dialog, select the JRE System Library from the list and click Next.
   6. Select the Alternate JRE option, and click Installed JREs to add a JRE. The preferences dialog for Installed Java Runtime Environments opens.
   7. Click Add.
   8. On the Add JRE dialog, specify the name and home directory of the JRE 1.4.0. Click OK.
   9. Click OK.
   10. Click Finish.
   11. Click OK in the properties dialog.
2. Confirm that all compilation errors have been fixed.
3. From the Java perspective, right-click on the project, and select Run > Run to run the sample class.
4. In the Run configuration dialog, double-click on Java application. A new configuration is created.
5. Under the Main tab, the project name is pre-filled. Click Search to find the Main class that should be run.
6. In the Choose Main Type dialog, double-click on the HyadesEMFCommonBaseEventv101Sample listed. The Main class field now has the value `HyadesEMFCommonBaseEventv101Sample`.
7. Under the Classpath tab, select User Entries and click the Advanced button.
8. In the Advanced Options dialog, select Add Folders and click OK.
9. Expand the folder HyadesEMFCommonBaseEventv101Sample and select the cfg folder.
10. Click OK. The cfg folder is added to the Classpath.
11. Click Run to run the sample.