新建项目没有src/main/java 和 src/main/resources 两个source文件的解决方法:

Step 1 : Create a Maven Webapp project. Right click on the Package Explorer pane go to New –> Maven Project

Step 2 : Select the archetype as “maven-archetype-webapp”  and click on next and give the artifact id as “HelloWorld”.

Step 3 : After you create a maven web app project, you will be having the Web project created like below. Now we can that the HelloWorld Project doesn’t have src/main/java and src/test/java folders in it. It has only the src/main/resource folder.

Step 4 : Even when you try to create a new Source folder you will be getting the error like ” The Folder is already a source folder “.

Step 5 : Fixing this issue is very simple, Right Click on the project go to Properties. In that go to Build Path, you will be having an error like ” 2 build path entries are missing “

 

Step 6 : This error usually occurs where the JRE System Library is wrongly pointed. Now go to Libraries tab and change the JRE System Library to the correct version.

Step 7 : Once the JRE System Library is changed the issue should be resolved, all you need to do is to do an Update Project (Right on the Project –> Maven –> Update Project). Now you should have the src/main/java and src/test/java folders.

Happy Learning !!

Fix missing src/main/java folder in Eclipse Maven Project – 2 build path entries are missing的更多相关文章

  1. maven web不能创建src/main/java等文件等问题

    我们在创建maven web项目的时候,默认只有src/main/resources这个source folder,我们按照maven结构添加src/main/java和src/test/java等s ...

  2. Eclipse中的创建maven项目,无法添加src/main/java等source folder

    maven无法添加src/main/java 通过Eclipse创建Java Web项目,目录结构如下: 默认是只有src/main/resources 这个source folder 按照maven ...

  3. 在Eclipse工具里创建maven的web工程,在建立src/main/java包出现The folder is already a source folder.解决

    1. 与创建普通java工程一样,点击右键找到New菜单,在弹出的界面输入maven ---->>点击maven Project------>>点击next 2  进入下一个界 ...

  4. eclipse中新建maven项目无法添加src/main/java问题

    eclipse创建maevn web项目,在选择maven_archetype_web原型后,默认只有src/main/resources这个Source Floder. 按照maven目录结构,添加 ...

  5. Eclipse 中 新建maven项目 无法添加src/main/java 问题

    eclipse创建maven web项目,在选择maven_archetype_web原型后,默认只有src/main/resources这个Source Floder. 按照maven目录结构,添加 ...

  6. 解决Eclipse建立Maven项目后无法建立src/main/java资源文件夹的办法

      建立好一个Maven项目后,如果Java Resources资源文件下没有src/main/java文件夹,并且在手动创建这个文件时提示“已存在文件”. 这说明,在这个项目配置中已经有了src/m ...

  7. Eclipse中建立Maven项目后,Java Resources资源文件下没有src/main/java文件夹

    当建立好一个Maven项目后,在Java Resources资源文件夹下没有看到src/main/java文件夹,然后手动去创建Source Folder时,提示该文件已存在,如图: 有一个解决办法: ...

  8. 解决eclipse新建项目看不到src/main/java目录办法

    1.eclipse->window->preferences->java->compiler->选择本地要用的Java版本 2.eclipse->window-&g ...

  9. 解决Eclipse建立Maven项目后无src/main/java资源文件夹的办法

    建立好一个Maven项目后,如果Java Resources资源文件下没有src/main/java文件夹,并且在手动创建这个文件时提示“已存在文件”.这说明,在这个项目配置中已经有了src/main ...

随机推荐

  1. flask中路由的本质源码分析

    flask中url的本质: 吧url和视图函数封装到一个Rule对象里面去了,并且吧这个对象添加到url_map中 Rule={"url":'/index','method':'i ...

  2. Guid ToString 格式

    转自 http://www.cnblogs.com/greenerycn/archive/2010/04/25/guid_tostring_format.html 在日常编程中,Guid是比较常用的, ...

  3. IOS开发之UIScrollVIew运用

    UIScrollView可以实现在一个界面看到所有内容,同时也不需要担心所显示的内容超出屏幕的大小,当超出之后可以翻阅至下一页浏览. #pragma mark - UIScrollViewDelega ...

  4. 【Unity】10.4 类人动画角色的控制

    分类:Unity.C#.VS2015 创建日期:2016-05-02 一.简介 导入角色网格和动画及设置 Avatar 之后,就可以准备开始在游戏中使用它们了.以下部分涵盖 Mecanim 提供的.用 ...

  5. RightScale 2019年云状态报告:公共云快速增长 微软Azure增长最快

    https://www.rightscale.com/ 全球云管理服务厂商RightScale发布了年度云状态报告,今年报告的十大主要内容包括:企业在多云平台上投入巨资.公共云继续快速增长,但是私有云 ...

  6. Gartner 2018新技术成熟度曲线

    https://blog.csdn.net/BtB5e6Nsu1g511Eg5XEg/article/details/82047719 近日,Gartner发布了2018年新技术成熟度曲线,首次将生物 ...

  7. Eclipse Alt+/ 智能提示失效

    Eclipse3.7  自动提示Alt+/不能导入包,且General->Keys->content assist中已经检查并无快捷键冲突 Eclipse中window->Prefe ...

  8. Git 忽略.idea/workspace.xml文件

    在使用idea进行提交代码时,执行提交时一直出现modified:   .idea/workspace.xml 非常让人烦恼. 问题原因: 原因在于Git的忽略,Git在同步代码时,设置本地忽略文件的 ...

  9. sql2005分页储存过程和C#分页类

    1.sql2005分页储存过程 --sql2005,qq524365501 create Procedure up_page2005 ), -- 表名称 ), -- 列 ), -- 主键,用于统计总数 ...

  10. TNS-12518,TNS-12536,TNS-00506,Linux Error: 11: Resource temporarily unavailable

    TNS-12518: TNS:listener could not hand off client connection TNS-12536: TNS:operation would block  T ...