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 7 (modified by malte.appeltauer, 11 years ago) (diff)


ContextJ - Context-oriented Programming for Java

ContextJ is a context-oriented extension to the Java language. It is implemented as a compiler, written in Java, based on the JastAdd compiler framework.

For more information, please see our publications related to the JCop and ContextJ project.


Please note that ContextJ will not be maintained anymore. However, all features of ContextJ are supported by its successor JCop.

Compiling Projects

The compiler is able to parse Java and ContextJ syntax. To run it, put the contextj.jar into the project root directory and execute the following command

java [more Java VM options] -jar contextj.jar <your.package.YourClass>

Besides the generation of Java class files for all project files, the package folder ./contextj/lang/ will be generated, containing class file representations for all layers definied in the project.

Executing Projects

To run your compiled project, execute:

java [more Java VM options] your.package.YourClass

Known Issues

Please consider the following restrictions of the current version:

  • default package classes are not supported, so each class must contain a package declaration
  • anonymous classes and inner classes must not contain layers