Hello,
I want to compile and run a small OT example from the command line.
My example works in Eclipse, however I cannot compile the example from the command line.
In the shell I execute:
java -jar otre/ecotj-R-2.2.0-201306071800.jar -cp otre/org.eclipse.objectteams.runtime_2.2.0.201305210612.jar Example.java
I get the following error:
----------
1. ERROR in /home/stephan/arbeit/paper_sac/code/Example.java (at line 7)
public team class Colored {
^^^^^^
Name clash: The method restoreRole(Class<?>, Object) of type Example.Colored has the same erasure as restoreRole(Class, Object) of type Team but does not override it
----------
1 problem (1 error)
The example works fine in Eclipse!
Here is my code:
public team class Example {
public class BEdge {
public void print() { System.out.println("I am basic.");}
}
public team class Colored {
public class ColoredEdge playedBy BEdge {
public void print() { System.out.println("I am colored.");}
}
public void test() {
BEdge edge = new BEdge();
edge.print();
}
}
public void test() {
new Colored().test();
}
public static void main(String[] args) {
new Example().test();
}
}
My Java version is:
java version "1.7.0_40"
OpenJDK Runtime Environment (IcedTea 2.4.1) (ArchLinux build 7.u40_2.4.1-1-x86_64)
OpenJDK 64-Bit Server VM (build 24.0-b50, mixed mode)
Thanks for any suggestions
Stephan