新建项目没有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. logstash 如何处理 mongodb 导出来的 _id value数据。 how to custom fields of logstash by mongo mapreduce exported data.(example format: {_id:"xxx"} , value:{})

    input { file { path => "c:\aa.json" start_position => "beginning" #sincedb ...

  2. Zookeeper服务器配置项详解

    文章转自: http://www.bug315.com/article/159.htm http://www.bug315.com/article/160.htm Zookeeper是通过一个***. ...

  3. Java数据结构和算法(六):前缀、中缀、后缀表达式

    前面我们介绍了三种数据结构,第一种数组主要用作数据存储,但是后面的两种栈和队列我们说主要作为程序功能实现的辅助工具,其中在介绍栈时我们知道栈可以用来做单词逆序,匹配关键字符等等,那它还有别的什么功能吗 ...

  4. [LeetCode] Paint House I & II

    Paint House There are a row of n houses, each house can be painted with one of the three colors: red ...

  5. 在eclipse-oxygen-sts中,关于快捷键[CTRL + SHIFT + O]失效的问题

    这是sts的一个bug,没关系,重新设置接口 按照如图位置修改即可 下图截自于stackoverflow

  6. 临摹一个像素风格高楼shader

    原始效果地址:http://glslsandbox.com/e#40050.0 是一个的城市高楼感的shader,比较像素风 可以拿来做游戏背景,或者基于这个思路做一些别的效果 这个是我后来找的版本, ...

  7. Tsk4.5异步

    public async void LoadData<T>(WhereClip where,OrderByClip order) where T : Entity, new() { try ...

  8. dom4j: 用dom4j生成xml后第二行空行的问题

    只需要指定: format.setNewLineAfterDeclaration(false); 即可. 例: OutputFormat format = OutputFormat.createPre ...

  9. 【小白的CFD之旅】23 串行与并行

    夏日的早晨,被酷热和蚊子骚扰了一夜的小白刚进入梦乡就被老蓝的电话给惊醒了. “8点开会!”老蓝说话永远那么简短有力,根本不给人请假的时间就挂了电话. 小白一看时间,都7点半了,得,这懒觉睡不成了.小白 ...

  10. 每日英语:The Benefits of a Sleep Buddy

    Stolen sheets, snoring and hot flashes are just some of the annoyances that lead a quarter of U.S. c ...