Java virtual machine launcher error- A java exception has occurred


I am a beginner. I am trying to run a java JDBC program in Eclipse with tomcat server. But when I run the program a pop up "Java virtual machine launcher" window with "A java exception error has occurred" is coming up.I think the code compilation is fine.

So how should I fix this problem.When I surf through different websites, some are saying that I should re-install java again . Is it true. Please help me with the answers.

Thanks in advance

Best Solution

For me, I just delete my metaData folder and start eclipse with importing all the necessary project and library files.