You can embed Java on your web page with Java Applet (old technology) or Java Web Start - both of them are not lightweight and will force user confirmation, not just simple start like flash player or something. In both of given solutions you must make simple GUI, not just application with main() method.
If you only want to see results of your Java program on a webpage - use simple Tomcat http server and learn about servlets.