Recipe 3.1. Deploying a Command-Line AspectJ ApplicationProblemYou want to deploy a simple AspectJ application to be deployed and then run from the command line. SolutionA straightforward Java application usually requires nothing more than a Java Runtime Environment on the target machine and the classes of your application added to the Java classpath before you can run your application. AspectJ requires that the Java Runtime Environment be at Version 1.1 or later, and it needs the additional aspectjrt.jar library added to the classpath to support the aspect-oriented features of your AspectJ application. DiscussionUsing the simple application developed in Recipe 2.2, the following steps create a directory containing all of the necessary deployment files needed to run your AspectJ application:
See AlsoRecipe 2.2 covers the basics of how to use the ajc command to compile your AspectJ applications; Java in a Nutshell by David Flanagan (O'Reilly) provides detailed information on the entire set of Java command-line tools including java. |