I am new to Eclipse. I wanted to run a simple HelloWorld servlet program in Apache-Tomcat. I am forced to use Eclipse and Tomcat combo. I am using Eclipse-Juno in Ubuntu 13.10 and Apache-Tomcat-6.0.39. I added the server to the Eclipse and typed my entire HelloWorld program by creating a new Dynamic web project. When i try to run my code using "Run on server", after asking which server to proceed, my eclipse window shutsdown forcefully. I can see a error log file in the eclipse folder. That shows:
#A fatal error has been detected by the Java Runtime Environment:
#SIGSEGV (0xb) at pc=0x00007f339758b680, pid=6672, tid=139862181361408
#JRE version: OpenJDK Runtime Environment (7.0_51) (build 1.7.0_51-b00)
#Java VM: OpenJDK 64-Bit Server VM (24.45-b08 mixed mode linux-amd64 compressed oops)
Problematic frame:
#C [libwebkitgtk-1.0.so.0+0x112b680] void WTF::freeOwnedGPtr<_GdkEvent>((_GdkEvent*)+0x16b50
But when i try to run my code without eclipse it works well.
Here is my HelloWorld program. I am sure the problem is not with this code.
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class HelloWorld extends HttpServlet {
private String message;
public void init() throws ServletException
{
message = "Hello World";
}
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException
{
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("<h1>" + message + "</h1>");
}
}
Why is this error occurring and why my eclipse shuts down automatically? Any help would be much appreciated.