"java.rmi.Remote cannot be resolved to a type" means?
I imported a web reference and from that service i got some classes and one of classes show error like java.rmi.R开发者_Go百科emote cannot be resolved to a type
. I'm new to this web services so can any one help me to get out of this.
What JDK are you using? What does java -version print? At what phase are you getting this error? and what is the exact error? not just what is it 'like'? If it's an exception please post the entire stack trace.
This is very often problem bind with JSExJEE. I changed my Project to Maven to avoid download libraries manually (in Eclipse it is very easy: Project - right click -> configure -> Maven). Then added to pom.xml support for Java EE:
<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
</dependency>
</dependencies>
Check if there is JRE System library set on JDK (In my case Oracle 1.7.0.71) Not JRE. You must have JAVA JDK installation rather than Java JRE (Project - right click -> Properties -> Java Build Path).
Similar solution: error: package javax.servlet does not exist
the compiler is telling you that it does not know what Remote is. insert the following like at the top of your source file (but after the package line if you have one).
import java.rmi.Remote;
精彩评论