[JAVA] "Selection does not include main type"

I'm using eclipse while learning Java. When I run code like the one below, I get the message "Selection does not include main type". Is the main type essential for code execution? The code is exactly what the school text says, but how can I do it? Thank you for your cooperation.

package la.servlet;

import java.io.IOException; import java.io.PrintWriter;

import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;



Recommended Posts

"Selection does not include main type"
Terminal does not start
error: src refspec main does not match any solution
Sidekiq-limit_fetch does not work
Spring-Boot main class not found
Ruby version does not switch