After Generation, you can launch your Adapt-Ready Application either from the command line
or from an IDE. However, it is vital that you include aspectjrt.jar in your application's classpath.
TRAP/J also requires a mode argument and a port number argument, and an optional config argument can be included too.
If the mode argument is "paused" your application will be paused at startup so that you can adapt it statically.
If the mode argument is "run" the application starts running as soon as you launch it so that you can begin
adapting it dynamically. The port argument determines on which port number the TRAP/J Composer will be listening for HTTP
requests. The optional config argument allows you to specify a configuration file saved from a previous TRAP/J Composer
session to quickly achieve a previous application state.
Below is an example of how to launch your Adapt-Ready Application from the command line in the TRAP/J installation directory.
java -classpath ".;lib/aspectjrt.jar" ApplicationEntryPoint -mode=paused -port=50000 -config=myconfig.xml
ApplicationEntryPoint
should be the fully qualified name of a class with a main method.
If you don't get the arguments right the first time, TRAP/J will show you this helpful reminder:
TRAP/J 2.1 command-line configuration
Options:
-config= <optional> Configuration file name
-mode= Set mode (run or paused)
-port= Specify TRAP/J server port number. Recommended ports: 49152 to 65535>
Restart application
If you're launching your application from an IDE, remember to include aspectjrt.jar in your classpath and some
values for the -mode and -port arguments in your launch configuration. You can find aspectjrt.jar in the TRAP/J "lib" folder.
« Generating an Adapt-Ready Application | Table of Contents TRAP/J Home |
TRAP/J Composer Interface » |