If you are a Java developer like me, chances are you are using Eclipse IDE for your development. If it is a standalone Java application, you can simply run within Eclipse. What if it is a Server side code, like JSP?
Eclipse allows you to configure connection to an web/Java container to be able deploy and run the program from within Eclipse. Here is a nice post about doing this for a simple JSP program. The concept is the same even if you are deploying complex Server side Java code or Servlet or JSP.