6

part of the specification of this desktop application is to have a mini browser built in, so that you can enter URL, and navigate the site as you would on a normal browser. Access to the browser page's DOM is required, should let me programmatically change the rendering view of a page, should be cross-platform, renders javascript

JDIC seems outdated and I've heard Mozswing doesn't run on Mac....

Jxbrowser license costs a grand and up.

Is Java the wrong platform to be creating such app? Are there any other solutions out there for building an application like this ?

Thank you.

Rex Logan
  • 26,248
  • 10
  • 35
  • 48
javadahut
  • 133
  • 1
  • 1
  • 4
  • duplicate of http://stackoverflow.com/questions/48249/is-there-a-way-to-embed-a-browser-in-java, http://stackoverflow.com/questions/1454652/embed-browser-in-java-based-desktop-application and possibly http://stackoverflow.com/questions/294813/embedding-web-browser-window-in-java – mdma May 31 '10 at 02:02
  • i already went through those. – javadahut May 31 '10 at 04:31

1 Answers1

1

You can possibly use the SWT browser widget to create a Mozilla browser using XULRunner. This will give you access to the underlying browser to let you do whatever you like with regards to manipulating the DOM. It's a bit complex though.

http://www.eclipse.org/swt/faq.php#whatisbrowser

You can see an example of DOM interaction via XPCOM here: http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet267.java?view=co

Chris Dennett
  • 22,412
  • 8
  • 58
  • 84