Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "OTHowtos/Running From Commandline"

 
Line 1: Line 1:
Running an OT/J program basically requires three additional arguments to the JVM:  
+
{{Note|Variants|Running OT/J programs differs slightly depending on the chosen [http://help.eclipse.org/neon/topic/org.eclipse.objectteams.otdt.doc/guide/weavingscheme.html weaving scheme].}}
 +
 
 +
==Weaving Scheme OTRE (traditional) ==
 +
Running an OT/J program under OTRE basically requires three additional arguments to the JVM:  
 
* the files otre.jar and org.apache.bcel_''version''.jar must be added to the classpath  
 
* the files otre.jar and org.apache.bcel_''version''.jar must be added to the classpath  
 
* the file otre_min.jar must be added to the bootstrap classpath  
 
* the file otre_min.jar must be added to the bootstrap classpath  
 
* the file otre_agent.jar must be passed as a javaagent.  
 
* the file otre_agent.jar must be passed as a javaagent.  
  
This is where these files can be found in an installation of the [[Object Teams Development Tooling|OTDT]]:
+
This is where these files can be found in an installation of the [[Object Teams Development Tooling|OTDT]] (version ≥ 2.0.0):
*'''OTDT ≤1.4.0:'''
+
:plugins/org.objectteams.otdt_''version''/lib/
+
::<code>otre.jar</code>
+
::<code>otre_min.jar</code>
+
:plugins/org.objectteams.runtime_''version''/
+
::lib/
+
:::<code>otre_agent.jar</code>
+
::otj/lib/jmangler/use/
+
:::<code>BCEL.jar</code> ''(note the old file name)''
+
 
+
*'''OTDT &ge; 2.0.0:'''
+
 
:plugins/org.eclipse.objectteams.otdt_''version''.jar!lib/ &mdash; ''unpack these nested jars to a location of your choice!''
 
:plugins/org.eclipse.objectteams.otdt_''version''.jar!lib/ &mdash; ''unpack these nested jars to a location of your choice!''
 
::<code>otre_agent.jar</code>
 
::<code>otre_agent.jar</code>
Line 24: Line 16:
  
 
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:  
 
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} -javaagent:${OTRE_AGENT} -classpath ${OTRE}:${BCEL}:''other_classpath_entries'' ''fully.qualified.Main''
+
   java -Xbootclasspath/a:${OTRE_MIN} -javaagent:${OTRE_AGENT} \
 +
    -classpath ${OTRE}:${BCEL}:''other_classpath_entries'' \
 +
    ''fully.qualified.Main''
  
 +
== Weaving Scheme OTDRE (dynamic) ==
 +
Running an OT/J program under OTDRE basically requires three additional arguments to the JVM:
 +
* the files otredyn.jar and ASM jars must be added to the classpath
 +
* the file otre_min.jar must be added to the bootstrap classpath
 +
* the file otredyn_agent.jar must be passed as a javaagent.
 +
 +
This is where these files can be found in an installation of the [[Object Teams Development Tooling|OTDT]] (version &ge; 2.3.0):
 +
:plugins/org.eclipse.objectteams.otdt_''version''.jar!lib/ &mdash; ''unpack these nested jars to a location of your choice!''
 +
::<code>otredyn_agent.jar</code>
 +
::<code>otredyn.jar</code>
 +
::<code>otre_min.jar</code>
 +
:plugins/
 +
::<code>org.eclipse.objectteams.runtime_''version''.jar</code>
 +
::<code>org.objectweb.asm_5.0.1.v201404071650.jar</code>
 +
::<code>org.objectweb.asm.commons_5.0.1.v201404071650.jar</code>
 +
::<code>org.objectweb.asm.tree_5.0.1.v201404071650.jar</code>
 +
 +
Given that the paths to these files are set to variables OTREDYN, OTRUNTIME, OTRE_MIN, OTRE_AGENT and ASM, the following (Unix) command line can be used to launch an OT/J program:
 +
  java -Xbootclasspath/a:${OTRE_MIN} -javaagent:${OTRE_AGENT} \
 +
    -classpath ${OTREDYN}:${OTRUNTIME}:${ASM}:''other_classpath_entries'' \
 +
    ''fully.qualified.Main''
 +
 +
 +
== Team activation (both weaving schemes) ==
 
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:  
 
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''
 
   -Dot.teamconfig=''config_file_name''
 
where ''config_file_name'' refers to a text file listing the teams to activate.
 
where ''config_file_name'' refers to a text file listing the teams to activate.
  
 +
== Older versions (from objectteams.org): ==
 +
Before the move to eclipse.org, necessary jars were found in these locations:
 +
*'''OTDT &le;1.4.0:'''
 +
:plugins/org.objectteams.otdt_''version''/lib/
 +
::<code>otre.jar</code>
 +
::<code>otre_min.jar</code>
 +
:plugins/org.objectteams.runtime_''version''/
 +
::lib/
 +
:::<code>otre_agent.jar</code>
 +
::otj/lib/jmangler/use/
 +
:::<code>BCEL.jar</code> ''(note the old file name)''
 +
 +
----
 
;See also: [[OTRE Parameters]] (controlling the behavior of the OTRE)
 
;See also: [[OTRE Parameters]] (controlling the behavior of the OTRE)
  
 
[[Category:Object Teams|Running from Commandline]]
 
[[Category:Object Teams|Running from Commandline]]

Latest revision as of 13:20, 10 November 2016

Note.png
Variants
Running OT/J programs differs slightly depending on the chosen weaving scheme.


Weaving Scheme OTRE (traditional)

Running an OT/J program under OTRE basically requires three additional arguments to the JVM:

  • the files otre.jar and org.apache.bcel_version.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 OTDT (version ≥ 2.0.0):

plugins/org.eclipse.objectteams.otdt_version.jar!lib/ — unpack these nested jars to a location of your choice!
otre_agent.jar
otre_min.jar
plugins/
org.eclipse.objectteams.runtime_version.jar
org.apache.bcel_5.2.0.v201005080400.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} -javaagent:${OTRE_AGENT} \
   -classpath ${OTRE}:${BCEL}:other_classpath_entries \
   fully.qualified.Main

Weaving Scheme OTDRE (dynamic)

Running an OT/J program under OTDRE basically requires three additional arguments to the JVM:

  • the files otredyn.jar and ASM jars must be added to the classpath
  • the file otre_min.jar must be added to the bootstrap classpath
  • the file otredyn_agent.jar must be passed as a javaagent.

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

plugins/org.eclipse.objectteams.otdt_version.jar!lib/ — unpack these nested jars to a location of your choice!
otredyn_agent.jar
otredyn.jar
otre_min.jar
plugins/
org.eclipse.objectteams.runtime_version.jar
org.objectweb.asm_5.0.1.v201404071650.jar
org.objectweb.asm.commons_5.0.1.v201404071650.jar
org.objectweb.asm.tree_5.0.1.v201404071650.jar

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

 java -Xbootclasspath/a:${OTRE_MIN} -javaagent:${OTRE_AGENT} \
    -classpath ${OTREDYN}:${OTRUNTIME}:${ASM}:other_classpath_entries \
    fully.qualified.Main


Team activation (both weaving schemes)

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.

Older versions (from objectteams.org):

Before the move to eclipse.org, necessary jars were found in these locations:

  • OTDT ≤1.4.0:
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 (note the old file name)

See also
OTRE Parameters (controlling the behavior of the OTRE)

Back to the top