close Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Version 79 (modified by malte.appeltauer, 10 years ago) (diff)



JCop is a context-oriented programming (COP) extension to the Java programming language. It combines COP features - introduced by its predecessor ContextJ - with new constructs for declarative and event-based layer composition and a first-class event-based context representation.

Behavioral variations are modularized by layers that can either be defined within classes (layer-in-class) or in dedicated top-level modules (class-in-layer). Layers contain partial method definitions that extend or replace a plain method while their layers are active.

Dynamic Composition.
JCop provides control-flow specific layer composition as known from other COP languages. In addition, it offers declarative composition statements that are specified within context modules and thus combines COP with concepts of aspect-oriented programming.


  • A JVM 1.5 or higher must be installed on the system.
  • Unpack the JCop archive in any directory.

    The archive contains the following files that are required to run the compiler via command line. Besides the platform independent JAR archives the JCop distribution contains command scripts for Windows and Unix systems.
    • jcop.jar, Executable archive that contains the JCop compiler.
    • aspectjtools.jar, aspectjrt.jar, AspectJ libraries that are required by jcop.jar.
    • aspectjweaver.jar, AspectJ library that is required for VM instrumentation at runtime.
    • agg_V165_classes.jar, AGG library required to generate an AGG graph instead of bytecode.
    • jcopc and jcop scripts for compilation and launching of JCop applications. If the scripts don't work, you may use the ['wiki:Manual#Underlying? Java Command' ]
  • The compiler requires a JCOP_HOME environment variable pointing to the directory in which the above archives and scripts are located. For convenience, the folder should also be added to the path variable to ease the access to the command scripts.


A manual describing command line options and more usage details can be found here.

Contact and Publications

For more information, please see our publications related to the JCop and ContextJ project or contact us: