Meaningless Drivel is fun!*
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 41173
    
  45

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

hmm, like i said, its a long time since i touched swing
 
Don't get me started about those stupid light bulbs.
 
subject: Open a web page from a java standalone class
 
Similar Threads
Tomcat, Apache and App Sever?
I want to design a java class (standalone) which will read Data from HTML page.Is it possible??
Open a URL from java swing application or java standalone program
Opening a web page with Java problems(BrowserLauncher problems)
Does anyone know how to import or call a standalone java class in a jsp page