Hi !
Featured games (85)
games approved by the League of Dukes
Games in Showcase (623)
Games in Android Showcase (176)
games submitted by our members
Games in WIP (676)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  is it possible to launch default web browser from java program?  (Read 1328 times)
0 Members and 1 Guest are viewing this topic.
Offline kylix999

Junior Devvie

« Posted 2006-02-07 14:32:34 »

i would like to make  my program  able to launch a web browser for example mozilla with some address url.
 it can be made using Proccess.exec, but i was thinking is it possible to do it in another way to launch DEFAULT user browser and also it should work on all platforms, of course i am talking about java programs not applets
Offline jbanes

JGO Coder

Projects: 1

"Java Games? Incredible! Mr. Incredible, that is!"

« Reply #1 - Posted 2006-02-07 14:51:18 »

If you were using an Applet, it would be easy. (Check the Applet methods for more info.) Otherwise your best option is JDIC. Webstart also provide the "showDocument()" method in javax.jnlp.BasicService.

Java Game Console Project
Last Journal Entry: 12/17/04
Offline kylix999

Junior Devvie

« Reply #2 - Posted 2006-02-07 15:17:09 »

jdic is very intresting, i also found intresting article about it here:
but i was thinking is it poosible to make it withut native libs, but this is also good, thanx jbanes

and there is also jrex :
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline jbanes

JGO Coder

Projects: 1

"Java Games? Incredible! Mr. Incredible, that is!"

« Reply #3 - Posted 2006-02-07 15:27:21 »

Glad to be of service. Just so you know, there's also the Browser Launcher library that's (supposedly) 100% Java. JDIC, OTOH, is slowly moving into the Java core, starting with release 1.6. So it's something of a toss-up as to which option is "better". Good luck!

Java Game Console Project
Last Journal Entry: 12/17/04
Offline swpalmer

JGO Coder

Exp: 12 years

Where's the Kaboom?

« Reply #4 - Posted 2006-02-07 15:30:38 »

it is easy to do without native libs.

Check the platform and run the command line that makes sense for the OS you are on.

Mac OS you can use "open  <url>"
Windows has a couple options, "cmd /C start /B <url>" works,and a more direct way, (I think this works) is "rundll32 SHELL32.DLL,ShellExec_RunDLL <url>"
Linux... is more troublesome Smiley

Offline kylix999

Junior Devvie

« Reply #5 - Posted 2006-02-07 15:46:22 »

you are the best guys, browser launcher is that what i was looking for, but it is quite old and some functions especially for macintosh are not working , but there is a new implementation of launchbrowser here which is the best and free:
and supports probably all systems:

Linux (2.4.x or higher)     FireFox, Mozilla, Netscape, Konqueror, Opera     Supported     Supported     
Mac OS X (10.2 or higher)       Supported    
SunOS    Mozilla, Firefox, Netscape    Supported    Supported    The default browser is invoked using the sdtwebclient command.
Windows 2000    Mozilla, Firefox, IE    Supported    Supported.    
Windows 2003    Mozilla, Firefox, IE    Supported    Supported.    
Windows 98    Mozilla, Firefox, IE    Supported    Supported.    
Windows NT    Mozilla, Firefox, IE    Supported    Supported.    
Windows XP    Mozilla, Firefox, IE    Supported    Supported.

and some intresting discussion can be found here:

also you may be intrested in this project :

again thanx guys
Offline TheAnalogKid

JGO Coder

Projects: 2

« Reply #6 - Posted 2006-02-07 17:42:17 »

Mustang provides an API to launch the default browser and other tools such as email client. Check on for the article on the API. Of course you have to stick to Java 6, which may have a major impact on the deployment of your app.

Offline kylix999

Junior Devvie

« Reply #7 - Posted 2006-02-12 13:51:03 »

browser email client in mustang cool, more can be found here:

thanx TheAnalogKid
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

basil_ (42 views)
2015-09-30 17:04:40

shadowstryker (21 views)
2015-09-29 15:55:06

TheSpaceHedgehog (27 views)
2015-09-29 01:58:48

GamerC4 (50 views)
2015-09-24 21:10:38

GamerC4 (70 views)
2015-09-24 21:09:48

htuy (27 views)
2015-09-24 04:57:24

htuy (36 views)
2015-09-24 04:56:35

htuy (25 views)
2015-09-24 04:56:09

htuy (26 views)
2015-09-24 04:47:33

Roquen (64 views)
2015-09-21 12:54:28
Math: Inequality properties
by Roquen
2015-10-01 13:30:46

Math: Inequality properties
by Roquen
2015-09-30 16:06:05

HotSpot Options
by Roquen
2015-08-29 11:33:11

Rendering resources
by Roquen
2015-08-17 12:42:29

Rendering resources
by Roquen
2015-08-17 09:36:56

Rendering resources
by Roquen
2015-08-13 07:40:51

Networking Resources
by Roquen
2015-08-13 07:40:43

List of Learning Resources
by gouessej
2015-07-09 11:29:36 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!