aspose 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: 928

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: 928

Refer to the following link :

how to create a simple browser in swing
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42601
    
  65

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 - my free Android networking tools app
Mansi Mishra
Ranch Hand

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

Joined: Jan 12, 2009
Posts: 928

hmm, like i said, its a long time since i touched swing
 
 
subject: Open a web page from a java standalone class