working with liveconnect

View: New views
3 Messages — Rating Filter:   Alert me  

working with liveconnect

by patmcclory@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I'm working on a firefox extension that needs to use java classes and
requires communication both ways between java and ff.  So liveconnect
seems to be the way to go from what I'm reading.

However I'm trying to write just a very basic javascript file that
declares a java string (like in the tutorials) and it doesn't appear
to be running properly.  I'm pretty sure it is firefox and not my
javascript because I've run a number of liveconnect tests I've found
online and am getting inconsistent results.

For example I attempted the test found here: http://srp.stanford.edu/demo/
and it does not succeed.

neither does this test:
http://developer.apple.com/internet/safari/samples/ColorBlockApplet.html

I'm running Firefox 2.0.0.14 on a mac (perhaps this is a mac specific
problem?).  Is there any sort of setup procedure that I can do for
liveconnect - or should it work inherently in the browser?

thanks a lot,
pat
_______________________________________________
dev-tech-java mailing list
dev-tech-java@...
https://lists.mozilla.org/listinfo/dev-tech-java

Re: working with liveconnect

by patmcclory@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Jun 2, 9:07 pm, "patmccl...@..." <patmccl...@...>
wrote:

> Hello,
>
> I'm working on a firefox extension that needs to use java classes and
> requires communication both ways between java and ff.  So liveconnect
> seems to be the way to go from what I'm reading.
>
> However I'm trying to write just a very basic javascript file that
> declares a java string (like in the tutorials) and it doesn't appear
> to be running properly.  I'm pretty sure it is firefox and not my
> javascript because I've run a number of liveconnect tests I've found
> online and am getting inconsistent results.
>
> For example I attempted the test found here:http://srp.stanford.edu/demo/
> and it does not succeed.
>
> neither does this test:http://developer.apple.com/internet/safari/samples/ColorBlockApplet.html
>
> I'm running Firefox 2.0.0.14 on a mac (perhaps this is a mac specific
> problem?).  Is there any sort of setup procedure that I can do for
> liveconnect - or should it work inherently in the browser?
>
> thanks a lot,
> pat

on further review it appears to be a problem with java in firefox and
not liveconnect.  normal java applets are not running in firefox.
_______________________________________________
dev-tech-java mailing list
dev-tech-java@...
https://lists.mozilla.org/listinfo/dev-tech-java

Re: working with liveconnect

by brettz9 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I'm very new to LiveConnect and even Java, but I had some experience
with this as I tried to harness Java software in my XML-related extensions.

The problems got worse with FF3 (though I remember reading somewhere
that there were plans to fix it?). I forget exactly which of these bugs
are only in FF3, but, these are the ones I encountered and reported...

1) The string issue you refer to:
https://bugzilla.mozilla.org/show_bug.cgi?id=417706
2) Try-catch: https://bugzilla.mozilla.org/show_bug.cgi?id=391642
3) Since FF3: Arrays:
https://bugzilla.mozilla.org/show_bug.cgi?id=434658 (has a viable
workaround)

One issue to watch out for specifically on the Mac btw is its lack of
support for Java 6 (not FF's fault).

John Resig mentions the string issue as if it were going to be a new
feature at slide 18 of
http://www.slideshare.net/jeresig/the-future-of-firefox-and-javascript/ 
in Rhino, though I understand Spidermonkey is what FF uses instead of
Rhino. But anyways, while I could be wrong, I really thought I had
java.lang.String working earlier, and regardless, I don't see why it
shouldn't work since LiveConnect is supposed to be able to do that kind
of thing.

The try-catch issue is a very serious issue for working with LiveConnect
since the only workaround is to catch the exceptions in the Java code
(which makes it hard when you're using others' libraries) and return the
error string (which can also require a change in the return type of the
method).

As you'll notice, there's been no response on any of these bugs so far,
so we'll see what happens... Would be great if someone in the know could
shed some light on us here...Sorry I don't know more...

best wishes,
Brett


patmcclory@... wrote:

> Hello,
>
> I'm working on a firefox extension that needs to use java classes and
> requires communication both ways between java and ff.  So liveconnect
> seems to be the way to go from what I'm reading.
>
> However I'm trying to write just a very basic javascript file that
> declares a java string (like in the tutorials) and it doesn't appear
> to be running properly.  I'm pretty sure it is firefox and not my
> javascript because I've run a number of liveconnect tests I've found
> online and am getting inconsistent results.
>
> For example I attempted the test found here: http://srp.stanford.edu/demo/
> and it does not succeed.
>
> neither does this test:
> http://developer.apple.com/internet/safari/samples/ColorBlockApplet.html
>
> I'm running Firefox 2.0.0.14 on a mac (perhaps this is a mac specific
> problem?).  Is there any sort of setup procedure that I can do for
> liveconnect - or should it work inherently in the browser?
>
> thanks a lot,
> pat
>  


_______________________________________________
dev-tech-java mailing list
dev-tech-java@...
https://lists.mozilla.org/listinfo/dev-tech-java
LightInTheBox - Buy quality products at wholesale price!