Re: Problem with java
Josué Leal Moura Dantas <[email protected]> Wed, 23 Mar 2011 17:04:24 -0300
| Newsgroups | gmane.comp.mozilla.devel.java |
|---|---|
| Message-ID | <[email protected]> |
I had already included all the jars that the class uses, but have I instantiate the classes too? Even that I had alrealdy included the jars whe= re they are? 2011/3/23 Markus Doering <[email protected]> > I created one JAR from my java project which i included in JavaScript. > I was using other APIs in this java project with external Jars (like > log4j). But this didn't work. I had to include all sourcefiles directly in > my java project. Otherwise i got an Exception from the error console of > Firefox. > I used this tutorial: > https://developer.mozilla.org/en/java_in_firefox_extensions > > > 2011/3/23 Josu=E9 Leal Moura Dantas <[email protected]> > >> Yes, my code is using other jars, but have I to include them in javascri= pt >> code? >> >> >> 2011/3/23 Markus Doering <[email protected]> >> >>> Do you use other projets-jars in your BuildPath? This wont work! You ha= ve >>> to include this Sourcefiles directly into your package! >>> >>> >>> 2011/3/23 Josu=E9 Leal Moura Dantas <[email protected]> >>> >>>> I've done thsis, but the strange thing is that the first call the >>>> function works, but in the second time a mentioned error happens, I th= ink >>>> it's because in my method instantiate many objects of other classes, a= ny >>>> other suggestions? >>>> >>>> >>>> 2011/3/22 Markus Doering <[email protected]> >>>> >>>>> Hi there, >>>>> >>>>> make a try-catch throug your code example. And catch this Exception >>>>> with like this: >>>>> >>>>> Class Test { >>>>> >>>>> public static void myMethod (String test) { >>>>> >>>>> try { >>>>> ...my Code >>>>> } catch (Exception e) { >>>>> e.printStackTrace >>>>> >>>>> } >>>>> Use always the Generic Exception. >>>>> Enable Browser-Plugin console and you get a correct Exception. You mu= st >>>>> do try and error! >>>>> >>>>> Good Luck! >>>>> >>>>> 2011/3/22 Josu=E9 Leal Moura Dantas <[email protected]> >>>>> >>>>>> I'm making an extension that calls a method of a java class in a jar >>>>>> through >>>>>> of the Liveconnect. I got to make the call, but it only do the first >>>>>> time, the >>>>>> second the following error is displayed "Error: uncaught exception: >>>>>> java.lang.reflect.InvocationTargetException", can anyone help me? >>>>>> >>>>>> -- >>>>>> Josu=E9 Leal Moura Dantas >>>>>> _______________________________________________ >>>>>> dev-tech-java mailing list >>>>>> [email protected] >>>>>> https://lists.mozilla.org/listinfo/dev-tech-java >>>>>> >>>>> >>>>> >>>> >>>> >>>> -- >>>> Josu=E9 Leal Moura Dantas >>>> Mestrando em Ci=EAncia da Computa=E7=E3o (UFPA) >>>> (94) 8117-0893 >>>> >>> >>> >> >> >> -- >> Josu=E9 Leal Moura Dantas >> Mestrando em Ci=EAncia da Computa=E7=E3o (UFPA) >> (94) 8117-0893 >> > > -- = Josu=E9 Leal Moura Dantas Mestrando em Ci=EAncia da Computa=E7=E3o (UFPA) (94) 8117-0893