我在package中有2节课P。接口类A及其实现类B。在具有类的文件中,B出现以下错误:The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files。
我正在使用Eclipse Helios和
$ java -version
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) Server VM (build 25.5-b02, mixed mode)
删除和添加JRE的标准解决方案不起作用。我该如何解决?
编辑: 代码:
ClassA:
package com.jax;
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.Style;
@WebService
@SOAPBinding(style = Style.RPC)
public interface WebServiceInter {
@WebMethod
String sayHello();
}
ClassB:
package com.jax; // **Error is here**
import javax.jws.WebService;
@WebService(endpointInterface = "com.jax.WebServiceInter")
public class WebServiceImpl implements WebServiceInter{
@Override
public String sayHello(){
return "Hello!";
}
}
项目结构:ProjectName-> Java资源-> com.jax-> Class A,ClassB