sunday888 2008-08-09 15:39
浏览 290
已采纳

刚用netbeans 。。遇到了些很奇怪的问题。不知道如何解决。。帮忙看下。。

我的一个系统,以前是myEclipse开发的,现在我把它导入到NetBeans中。开始遇到了一些找不到form中的get/set 方法问题,后来我把form中的get/set都删了,又重新生成了一遍,问题解决了。但现在又来一个问题。。就是下面的。。。编译期没有任何问题。这是运行时页面报出的错误。
java.lang.Error: Unresolved compilation problems:
The import java.util.HashMap cannot be resolved
The import java.util.Iterator cannot be resolved
The import java.util.List cannot be resolved
The import java.util.Map cannot be resolved
The import java.util.ResourceBundle cannot be resolved
The import java.util.Set cannot be resolved
The import javax.servlet.http.HttpServletRequest cannot be resolved
The import javax.servlet.http.HttpServletResponse cannot be resolved
The import javax.servlet.http.HttpSession cannot be resolved
The hierarchy of the type LoginAction is inconsistent
ResourceBundle cannot be resolved to a type
HttpServletRequest cannot be resolved to a type
HttpServletResponse cannot be resolved to a type
HttpSession cannot be resolved to a type
String cannot be resolved to a type
String cannot be resolved to a type
String cannot be resolved to a type
String cannot be resolved to a type
HttpSession cannot be resolved to a type
HttpSession cannot be resolved to a type
HttpSession cannot be resolved to a type
HttpSession cannot be resolved to a type

请问这是为什么?似乎是环境变量的问题?可是我的环境变量都配置了啊。。

[b]问题补充:[/b]
谢谢你的回答 。。我在NetBeans下面又建了一遍工程。。。这样给搞定了。。。

  • 写回答

1条回答 默认 最新

  • qichunren 2008-08-09 15:42
    关注

    这是因为在netbean工程中,你没有导入错误中提示的相关jar包,你导入那些相关的jar包,或者把它们加到classpath中去.

    另外一个方便的做法就是你新建一个web工程,然后把原先工程的相关代码copy到你新建的工程中来,这样也行的.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料