Developing Apama Applications > Developing Apama Applications in Java > Developing and Deploying Java Applications > Deploying Java applications
Deploying Java applications
To deploy and run your application outside Apama Studio:
1. Start a correlator with Java enabled:
correlator –j other_options
2. Inject the application JAR file:
engine_inject –j application_name.jar
Apama creates an object instance of each monitor class defined in the deployment descriptor file and executes its onLoad method. If there are multiple monitor classes, they are injected in the order in which they are specified in the jmon-jar.xml file.
The classes in the application’s JAR file cannot also exist (have the same packaging and name) anywhere else on the classpath. If they do, it causes the application to fail to load.
When you start the correlator, you can pass properties and options to the embedded JVM with the –J option. Specify the -J option with each property or option you want to specify. However, you cannot use this mechanism to pass the classpath to the JVM. The correlator sets the classpath implicitly as the last option, which overrides any value you might have set. Set the CLASSPATH environment variable if you want to set a particular classpath.
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.