当前位置: 技术问答>java相关
怎么设置classpath
来源: 互联网 发布时间:2017-03-19
本文导语: 很多程序引入了包,但编译时找不到 例如 import javax.ejb.EntityContext; import javax.ejb.CreateException; 编译就报 CabinBean.java:3: cannot resolve symbol symbol : class EntityContext location: package ejb import javax.ejb.EntityContext; ...
很多程序引入了包,但编译时找不到
例如
import javax.ejb.EntityContext;
import javax.ejb.CreateException;
编译就报
CabinBean.java:3: cannot resolve symbol
symbol : class EntityContext
location: package ejb
import javax.ejb.EntityContext;
^
CabinBean.java:4: cannot resolve symbol
symbol : class CreateException
location: package ejb
import javax.ejb.CreateException;
遇到这种情况应该怎么正确设置classpath?
例如
import javax.ejb.EntityContext;
import javax.ejb.CreateException;
编译就报
CabinBean.java:3: cannot resolve symbol
symbol : class EntityContext
location: package ejb
import javax.ejb.EntityContext;
^
CabinBean.java:4: cannot resolve symbol
symbol : class CreateException
location: package ejb
import javax.ejb.CreateException;
遇到这种情况应该怎么正确设置classpath?
|
在我的电脑--》属性--》高级--》环境变量中设置
classpath值为.;yourDirectoryj2ee.jar
classpath值为.;yourDirectoryj2ee.jar