0

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 Jan 10, 2011 at 17:55
1
  • You want your application to launch the browser, displaying your dynamically created HTML? Commented Jan 10, 2011 at 17:57

3 Answers 3

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.

answered Jan 10, 2011 at 17:58
Sign up to request clarification or add additional context in comments.

Comments

1

You should read Runtime it allows you to execute a launch of a program (your default browser for instance.

answered Jan 10, 2011 at 17:59

Comments

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.

answered Jan 10, 2011 at 17:59

1 Comment

tomcat would be heavy for his task I'm sure that more lightweight servlet container exists for such task such as winstone en.wikipedia.org/wiki/Winstone_Servlet_Container or Jetty docs.codehaus.org/display/JETTY/Embedding+Jetty

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.