It depends on what exactly you want to do. LiveConnect allows calling javascript functions from java and accessing java from javascript. But everything is not possible - you are restricted by the DOM, of course.
Here's info on LiveConnect: http://developer.netscape.com/docs/manuals/communicator/jsguide4/livecon.htm