File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JNLP and Web Start and the fly likes Javascript web start application methods Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JNLP and Web Start
Bookmark "Javascript web start application methods" Watch "Javascript web start application methods" New topic

Javascript web start application methods

Chris Pat
Ranch Hand

Joined: Aug 27, 2005
Posts: 156
Is there any way or any alternative technology that will allow the deployment of client-side Java application with access to application methods from JavaScript? Applets work, but you incur the life-cycle and if the page is navigated away from destroy() is not friendly. I thought Liveconnect would give me access or something specific for Chrome or Firefox. Any enlightenment would be appreciated.
Paul Clapham

Joined: Oct 14, 2005
Posts: 19973

You're looking for something which can interact with the browser, then? That would exclude Web Start, since the browser is only used as a delivery mechanism and nothing else.

However: back in 2004 Sun had a project called "JDIC" in which they were doing some hacking around, working on some things which eventually made it into Java 6. One of those things was a Swing component which actually embedded a browser. I downloaded that a couple of years ago and managed to make a Swing component which started up Google Maps and did Javascript things like putting a marker where the user clicked. It only worked with Internet Explorer but it was still pretty cool and I use that component regularly.

Unfortunately when I googled to track it down again just now, all of the links are broken. Here's a link to an article about it:

Most of the links in that article are broken, but one of them points to what looks like a new incarnation of the project, started just this year:

I don't see anything there but a link to source code via Subversion, but perhaps if you poke around a bit you might find something else. Anyway if you're willing to mess about with Live Connect then perhaps downloading unknown source code wouldn't be too hard. Let us know if you try that and tell us how you got on with it.
Chris Pat
Ranch Hand

Joined: Aug 27, 2005
Posts: 156
Hi Paul
Thanks. After about two weeks exclusively on this topic I think I have some clarity. What is needed is a JNDI for dragged applets and installed applications and the ability of Liveconnect to query it and call its methods like normal applet on a page. Yes, I see the security issues(some will sarcastically call it a self-implantable virus delivery system) but the programming power is significant and the necessary security is already there. I am trying to simulate that with a dragged applet from a frame and some type of bootstrap but I dont know how to make Liveconnect access the appletstub of a dragged applet. Interestingly the docs state that the applet can bootstrap Java-JS communication. So I dont know if something like two applets on the first page, one dragged and one probe and the probe one on every successive page. All I need is a means for Liveconnect to query Web start maintained applications. I am nonplused without further documentation.
I agree. Here's the link:
subject: Javascript web start application methods
It's not a secret anymore!