Opening HTML file in web browser from Java app

A

Arun

I simply want to open a HTML help file, in the same way a program like
Adobe Photoshop does.

I've tried Applet and JConfig to do this but to no avail.

Can someone tell me the easiest way to open a html file within my
project in the default web browser of the OS the app is running on?

Thanks
 
M

Marcin Grunwald

Daniel said:
Two people in six minutes. There's no single way to do it for all
platforms. Here's how to do it on Windows:

http://groups-beta.google.com/group/comp.lang.java.programmer/msg/bd52c25dad8c1589

I don't know a good solution for Linux (you could try to get the $BROWSER
environment variable if it's present). I don't know about Macs.

Dan.

It isn't exactly what you want but you can display HTML with
javax.swing.JTextPane. You can even find complete and ready to use Html
Help Viewer.
For example I have found that JEdit (Open Source) has Help Viewer:
http://www.jedit.org/42docs/api/org/gjt/sp/jedit/help/HelpViewer.html
or even better:
http://helpgui.sourceforge.net/
and another one
http://supportweb.cs.bham.ac.uk/doc...system/build/tutorials/javahelp/javahelp.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top