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


ContextJ - Context-oriented Programming for Java

The ContextJ compiler is an extension to the JastAddJ Java compiler that is implemented based on the JastAdd? compiler framework, see The compiler is implemented as a Java JAR file. The latest version is included in this archive.

Please note that ContextJ will not be maintained anymore. However, all features of ContextJ are supported by its successor JCop. For more information, please see our publications related to the JCop and ContextJ project.

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