eclipse实用小技巧

£神魔★判官ぃ 2022-07-14 22:16 458阅读 0赞

1、web项目有时候会出现”Cannot change version of project facet Dynamic Web Module to 3.1 “, 这时请首先修改此项目的web.xml文件,使文件头部声明为

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
  4. http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
  5. version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee">

另外,切换到eclipse的navigator视图,并如下操作:

  1. Change the dynamic web module version in this line to 3.0 - <installed facet="jst.web" version="2.5"/> And then:
  2. Right-click on the project (in the Project Explorer panel).
  3. Select Maven » Update Project (or press Alt+F5)
  4. You'll find this file in the .settings directory within the Eclipse project.

2、eclipse经常卡在”loading descriptor for XXX”, 这时 clipse左侧的 Project Explorer 的右边一个按钮钮,鼠标移上去会提示”View Menu”点击。选择Customize View切换到Content勾选掉Java EE Navigator Content WEB最后重启下eclipse。

3、eclipse经常卡在”validate XXX “或者”build workspace”, 这时可以如下操作:

  1. 取消掉“project -> Buiild Automatically”选项;
  2. 进入Windows->Preferences->Java->Editor->Hovers,然后关掉eclipse相关的hover选项;
  1. 在设置里点击”validation”,取消各种文件的“build”这一列。若不放心,可以在项目的具体文件右键选择”validate”即可。

发表评论

表情:
评论列表 (有 0 条评论,458人围观)

还没有评论,来说两句吧...

相关阅读