Embedding Web Browser (prefer Firefox) in Java Application.

D

Daniel Pitts

I was wondering about and hoping for a way to embed or control a web
browser from within a Java application. It doesn't have to be
cross-platform, but that is a bonus.

It also doesn't have to be Firefox, but that is a big bonus. My project
is basically going to monitor some of my favorite sites, and when they
change, download the latest version of them for offline viewing. It
would be nice if there could be a good integration with FF's rendering
engine.

Thanks,
Daniel.
 
A

Andrew Thompson

I was wondering about and hoping for a way to embed or control a web
browser from within a Java application. It doesn't have to be
cross-platform, but that is a bonus.

Check out the https://jdic.dev.java.net/ demo 'Browser'.
"This demo embeds a WebBrowser component to render the
HTML page specified in the URL text field. "
....
"Note: To run this demo, you must use Internet Explorer
or Mozilla (1.4 or a higher version) on Windows platforms;
use Mozilla (1.4 or a higher version) on Linux/Unix
platforms."

F-U set to c.l.j.g. only.
 
N

Nigel Wade

Daniel said:
I was wondering about and hoping for a way to embed or control a web
browser from within a Java application. It doesn't have to be
cross-platform, but that is a bonus.

It also doesn't have to be Firefox, but that is a big bonus. My project
is basically going to monitor some of my favorite sites, and when they
change, download the latest version of them for offline viewing. It
would be nice if there could be a good integration with FF's rendering
engine.

Do you need to integrate the rendering? Could you use an external FF
application?

As I understand it (it's not something I've even looked into, never mind
actually tried) you can communicate with a running FF process via a socket.
Also, if you run FF and FF determines that another instance is already running
on that display then instead of starting a new instance it sends a message to
the running app. asking it to display the requested URL.
 
J

Jarrick Chagma

Daniel Pitts said:
I was wondering about and hoping for a way to embed or control a web
browser from within a Java application. It doesn't have to be
cross-platform, but that is a bonus.

It also doesn't have to be Firefox, but that is a big bonus. My project
is basically going to monitor some of my favorite sites, and when they
change, download the latest version of them for offline viewing. It would
be nice if there could be a good integration with FF's rendering engine.

Have you heard about JWebPane? It's a new Swing component that's due in
Java 7 I believe and is basically a Java front end to a WebKit browser pane.
I realise you cannot use it now but you may like to factor it in to your
longer term plans.

--
Regards,

Jarrick

"If you want the car in front of you to go faster, try to overtake it."
__________________________________________________________________________________
[[email protected]] (Lose your prejudice before
emailing me)
 
D

Daniel Pitts

Jarrick said:
Have you heard about JWebPane? It's a new Swing component that's due in
Java 7 I believe and is basically a Java front end to a WebKit browser
pane. I realise you cannot use it now but you may like to factor it in
to your longer term plans.
That's an idea. I hadn't heard of it before. My application is mostly
for my own use, so I have no problem using not-yet-stable components for
now. I'll look into it.

Thanks,
Daniel.
 

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

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top