Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [atf-dev] IBM AJAX Toolkit question

On 7/12/06, Miroslav Penkov <mpenkov@xxxxxxxxxxxx> wrote:
1) how to create XPCOM components in java (with sample best)

This isn't yet supported in the purest sense: i.e. an XPCOM component written completely in Java.

In addition to the link provided by John Barton, have a look at http://developer.mozilla.org/en/docs/Java_in_Firefox_Extensions.

2) how to call our java application code from _javascript_ within mozilla.

Depends on what you want to do.  You can implement a Mozilla interface in Java, and pass that to Mozilla.  Then Mozilla (whether written in C++ or _javascript_), will call your implementation (which is written in Java).

If that is not an option, than you need to create some way to hook your application code to Mozilla.  Perhaps you could create an RMI server component for Mozilla (wrapped in a _javascript_ component, as explained in the link above).  Then your application code could connect to the RMI server and communicate back and forth.

3)how to call  _javascript_ code from our java application.

Well, if the _javascript_ code is the implementation of a known interface, than all the Java code needs to do is get access to that interface and call on it.  Same as if it was calling into some Mozilla C++ code.


Javier Pedemonte
ATF Developer

Back to the top