Developing Apama Applications > Developing Apama Applications in Java > Developing and Deploying Java Applications > Steps for developing Java applications manually
Steps for developing Java applications manually
The procedure for developing Java applications outside Apama Studio is as follows:
1. Ensure that correlator_extension_api5.1jar is in your Java CLASSPATH environment variable.
2. Create a folder in which to develop your application.
3. In this development folder, define one .java file for each event type and one .java file for each monitor class.
4. Ensure that there is a deployment descriptor file named jmon-jar.xml. See Creating deployment descriptor files.
5. In your development folder, compile all your Java source code.
javac *.java
If correlator_extension_api5.1.jar is not already in your CLASSPATH environment variable, you can specify the –classpath command-line option to point to correlator_extension_api5.1.jar.
6. In your development folder, create a JAR file that contains the deployment descriptor and all class files. The command line format is as follows:
jar –cf application_name.jar META-INF/jmon-jar.xml *.class
Replace application_name with a name you choose for your application. On Windows, use backslashes "\" instead of forward slashes "/".
If your application uses an event type definition class that is also used by another Apama Java application, you must include the event type definition class in the JAR file of each application that uses it. If you do not include a shared event type definition class in your application’s JAR file, injection fails with an ApplicationVerificationException.
You cannot specify the location of a shared event type definition class in your CLASSPATH environment variable. The correlator uses a separate classloader for each application, and it cannot use the system classloader for event type definition classes.
7. If any of your application’s .class files are in your CLASSPATH environment variable, remove them. If the JRE can resolve a class path by using either your application’s JAR file or your CLASSPATH environment variable, Apama fails to load your application.
Copyright © 2013 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel and/or their licensors.