JML Cannot find type

452 Views Asked by At

I'm using JML to test some simple classes. I have class Interval.java , SequenceInterval.java and TestSequence.java, all in the same package(default package). When I try to compile SequenceInterval using jmlc it shows the same error:

D:\work_java\VV_Lab1\src\JML>jmlc -Q SequenceInterval.java
File "SequenceInterval.java", line 22, character 42 error: Cannot find type "Interval"
File "SequenceInterval.java", line 35, character 15 error: Cannot find type "Interval"

every line I use an object of type Interval. It's the first time I use ESCJava and JML, so I'm a total newbie with this. Did I forget smth? I read about the 'model import' annotation, but that's not what I need, as I use class Interval in my Java code. So, how do I get rid of this error? It's obviously not a problem from the classpath. Tnx

1

There are 1 best solutions below

0
On

You most likely need to just pass Interval.java into jmlc as well. If Interval.java has not been compiled (so that a .class file has been generated on the classpath) ESC/Java2 won't know about the type.