Running OT/J Programs in JPLIS Mode

See wiki:OTJ#ObjectTeamsRuntimeEnvironmentOTRE for the different modes for running OT/J programs

Running an OT/J program in this mode basically requires three additional arguments to the JVM:

  • the files otre.jar and BCEL.jar must be added to the classpath
  • the file otre_min.jar must be added to the bootstrap classpath
  • the file otre_agent.jar must be passed as a javaagent.

This is where these files can be found in an installation of the ObjectTeamsDevelopmentTooling (OTDT):

  • plugins/org.objectteams.otdt_version/lib/
    • otre.jar
    • otre_min.jar
  • plugins/org.objectteams.runtime_version/
    • lib/
      • otre_agent.jar
    • otj/lib/jmangler/use/
      • BCEL.jar

Given that the paths to these files are set to variables OTRE, OTRE_MIN, OTRE_AGENT and BCEL, the following (Unix) command line can be used to launch an OT/J program:

java -Xbootclasspath/a:${OTRE_MIN} -javagent:${OTRE_AGENT} -classpath ${OTRE}:${BCEL}:<other classpath entries> <fully.qualified.Main>

If some teams should be instantiated and activated at launch time using the mechanism of OTJLD §5.5 the following argument is added to the command line:

-Dot.teamconfig=<config_file_name>

where <config_file_name> refers to a text file listing the teams to activate.