In one of my java console application, I am dynamically creating html page. Now I want to open it using default web browser. So can you guys please help me out to solve it.
Asked
Active
Viewed 9,649 times
0
-
You want your application to launch the browser, displaying your dynamically created HTML? – dom farr Jan 10 '11 at 17:57
3 Answers
2
Swing java.awt.Desktop.getDesktop().browse(uri);
SWT Program.launch(uri);
Taken from In Eclipse Plug-in, how to launch a web url using system broswer?
Assuming you have a file to open.
0
With Java, your website is dynamic, so you need a server to run your web application. The most common one is Apache Tomcat. You should read about Tomcat if you plan to program websites with Java.

Jonathan Rioux
- 1,067
- 2
- 14
- 30
-
tomcat would be heavy for his task I'm sure that more lightweight servlet container exists for such task such as winstone http://en.wikipedia.org/wiki/Winstone_Servlet_Container or Jetty http://docs.codehaus.org/display/JETTY/Embedding+Jetty – dvhh Jan 10 '11 at 18:07