Currently doing a typestate project and I am having problems with importing the List class. When I try to compile the class it throws an error in command line saying cannot find
Your Java file is missing an import statement for java.util.List, which is why it's failing to compile.
Unlike String and Integer, List is not in the java.lang package. You need to import java.util.List, not java.lang.List.
If I'm understanding your scenario correctly, your other program is generating the import statements and attempting to add an import for java.lang.List, which doesn't actually exist. Interestingly, there's no import statement in your code for java.lang.List. I don't know if that's a bug in your other program or a feature! But more than likely your problem will go away if you replace your line in the .scr file with type <java> "java.util.List" from "rt.jar" as List;
You are using the interface List but you didn't import it, it says that It can not find symbol java.lang.List because it is trying to search this class in the default java.lang package, add the import java.util.List
and you are not going to have problems