File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Open a web page from a java standalone class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Open a web page from a java standalone class" Watch "Open a web page from a java standalone class" New topic
Author

Open a web page from a java standalone class

Mansi Mishra
Ranch Hand

Joined: Dec 26, 2008
Posts: 50
Hi

I need to open a web page say "www.google.com" from a java standalone class. I am using JDK 1.5.
Any help is appreciated...

Thanks
Mansi


http://splashpress.blogspot.com
Mansi Mishra
Ranch Hand

Joined: Dec 26, 2008
Posts: 50
I got the solution. I am posting it here for people who might face the similar issue later. This is customized for windows applications.

salvin francis
Ranch Hand

Joined: Jan 12, 2009
Posts: 917

isnt thre a component in swing that allows you to load an html page via url ?

I am not sure about the name, its been long since i saw swing

i think its the JEditorPane (i may be wrong)


My Website: [Salvin.in] Cool your mind:[Salvin.in/painting] My Sally:[Salvin.in/sally]
salvin francis
Ranch Hand

Joined: Jan 12, 2009
Posts: 917

Refer to the following link :

how to create a simple browser in swing
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39548
    
  27

That Swing component supports a version of HTML that's been obsolete for so long that it's unlikely to render recent web pages properly (it supports HTML 3.2, no CSS, no JavaScript). A much better alternative is the Lobo web browser component.

A better (read: cross-platform) alternative for opening a page in a browser would be to use Bare Bones Browser Launch.


Ping & DNS - updated with new look and Ping home screen widget
Mansi Mishra
Ranch Hand

Joined: Dec 26, 2008
Posts: 50
Thanks guys for the response
salvin francis
Ranch Hand

Joined: Jan 12, 2009
Posts: 917

hmm, like i said, its a long time since i touched swing
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Open a web page from a java standalone class
 
Similar Threads
Does anyone know how to import or call a standalone java class in a jsp page
Tomcat, Apache and App Sever?
Open a URL from java swing application or java standalone program
Opening a web page with Java problems(BrowserLauncher problems)
I want to design a java class (standalone) which will read Data from HTML page.Is it possible??