简体   繁体   中英

How to create package in Java EE application using Eclipse

I have created a new Java EE project using Eclipse. But when I'm trying to create a new package inside the project I'm getting an error message like "Source folder does not exists".

Can anyone help me?

You should create your packaging inside a folder src/main/java then maybe some part like your jsp or template inside the src/main/webapp folder.

With eclipse you should use maven with some archetype depending on your needs, you can easily create a full webapp like this.

You might right click on src and click on "Build Path / Remove from build path" depending on your needs. then you packaging should be inside this src file, you might check with you explorer if some folder exist inside your src folder

如果要创建Maven Web应用程序项目。使用以下命令创建WebApp项目后,您可以创建新软件包。

mvn archetype:generate -DgroupId={project-packaging} -DartifactId={project-name} -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM