List Info

Thread: Calling an applet from a jar library




Calling an applet from a jar library
user name
2007-05-07 11:48:32
Hi devs,

I tried to launch an applet which is in a jar library from a click on a JButton.
So I did put the .jar with my applet.class and all the dependancies in the lib/installer-exclude/ directory.

In my actionPerformed(ActionEvent e)  method, i make a call to the applet by creating a new instance of it : JMyApplet ap = new JMyApplet();
I even set it visible with the setVisible(true) ; method but nothing is launched.
Whereas is a make a new instance of the JDialog of the exampleplugin, i've got the window.

Of course, I added : <zipfileset src="${lib.noinst}/JMySpell.jar" prefix=&quot;"/&gt; &nbsp;  into the target tags.

Have u any idea of what could cause the problem ?

Jean-Daniel
Re: Calling an applet from a jar library
user name
2007-05-09 09:03:09
Hello Jean-Daniel,

This looks strange indeed. I suspect that the JMySpell.jar
might be 
using packages that are either not imported by your manifest
or are not 
exported by any of the other bundles.

In either case it would be easier to tell what's going on if
you could 
send over the output of the error/exception that you are
getting when 
clicking on the button.

Cheers
Emil

francky vincent wrote:
> Hi devs,
> 
> I tried to launch an applet which is in a jar library
from a click on a 
> JButton.
> So I did put the .jar with my applet.class and all the
dependancies in 
> the lib/installer-exclude/ directory.
> 
> In my actionPerformed(ActionEvent e)  method, i make a
call to the 
> applet by creating a new instance of it : JMyApplet ap
= new JMyApplet();
> I even set it visible with the setVisible(true)  method
but nothing is 
> launched.
> Whereas is a make a new instance of the JDialog of the
exampleplugin, 
> i've got the window.
> 
> Of course, I added : <zipfileset
src="${lib.noinst}/JMySpell.jar" 
> prefix=""/>    into the target tags.
> 
> Have u any idea of what could cause the problem ?
> 
> Jean-Daniel

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
For additional commands, e-mail: dev-helpsip-communicator.dev.java.net


Re: Calling an applet from a jar library
user name
2007-05-09 09:47:05
The problem is that I had no error/exception message when clicking on the button.
After I tried to use the method init() from the JMyApplet class and now it launches a dialog window with just error on it and no message in the console which could be more explicit.



2007/5/9, Emil Ivov < emchoemcho.com">emchoemcho.com>:
Hello Jean-Daniel,

This looks strange indeed. I suspect that the JMySpell.jar might be
using packages that are either not imported by your manifest or are not
exported by any of the other bundles.

In either case it would be easier to tell what's going on if you could
send over the output of the error/exception that you are getting when
clicking on the button.

Cheers
Emil

francky vincent wrote:
>; Hi devs,
>
> I tried to launch an applet which is in a jar library from a click on a
> JButton.
&gt; So I did put the .jar with my applet.class and all the dependancies in
> the lib/installer-exclude/ directory.
>
> In my actionPerformed(ActionEvent e) &nbsp;method, i make a call to the
> applet by creating a new instance of it : JMyApplet ap = new JMyApplet();
> I even set it visible with the setVisible(true) ; method but nothing is
> launched.
> Whereas is a make a new instance of the JDialog of the exampleplugin,
> i've got the window.
&gt;
> Of course, I added : <zipfileset src="${lib.noinst}/JMySpell.jar"
> prefix=&quot;"/&gt; &nbsp; &nbsp;into the target tags.
>
> Have u any idea of what could cause the problem ?
>
&gt; Jean-Daniel

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net">dev-unsubscribesip-communicator.dev.java.net
For additional commands, e-mail: dev-helpsip-communicator.dev.java.net">dev-helpsip-communicator.dev.java.net


Re: Calling an applet from a jar library
user name
2007-05-09 09:57:15
This is really weird, (I mean the fact that you don't see an
exception 
on the console) try looking again as given the huge amounts
of logs that 
SC spits during a debug session it would be easy to miss
it.

Apart from that you could also add some trace println calls
in the 
method that is supposed to show the applet window (including
after the 
setVisible() and init calls) then try to look them all up in
the logs. 
If one of them is missing then you could more easily
determine where the 
exception is being thrown (and it would probably also help
you to find 
the stack trace).

Cheers
Emil

JD wrote:
> The problem is that I had no error/exception message
when clicking on 
> the button.
> After I tried to use the method init() from the
JMyApplet class and now 
> it launches a dialog window with just error on it and
no message in the 
> console which could be more explicit.
> 
> 
> 
> 2007/5/9, Emil Ivov <emchoemcho.com
<mailto:emchoemcho.com>>:
> 
>     Hello Jean-Daniel,
> 
>     This looks strange indeed. I suspect that the
JMySpell.jar might be
>     using packages that are either not imported by your
manifest or are not
>     exported by any of the other bundles.
> 
>     In either case it would be easier to tell what's
going on if you could
>     send over the output of the error/exception that
you are getting when
>     clicking on the button.
> 
>     Cheers
>     Emil
> 
>     francky vincent wrote:
>      > Hi devs,
>      >
>      > I tried to launch an applet which is in a jar
library from a
>     click on a
>      > JButton.
>      > So I did put the .jar with my applet.class
and all the
>     dependancies in
>      > the lib/installer-exclude/ directory.
>      >
>      > In my actionPerformed(ActionEvent e)  method,
i make a call to the
>      > applet by creating a new instance of it :
JMyApplet ap = new
>     JMyApplet();
>      > I even set it visible with the
setVisible(true)  method but
>     nothing is
>      > launched.
>      > Whereas is a make a new instance of the
JDialog of the
>     exampleplugin,
>      > i've got the window.
>      >
>      > Of course, I added : <zipfileset
src="${lib.noinst}/JMySpell.jar"
>      > prefix=""/>    into the target
tags.
>      >
>      > Have u any idea of what could cause the
problem ?
>      >
>      > Jean-Daniel
> 
>    
------------------------------------------------------------
---------
>     To unsubscribe, e-mail:
>     dev-unsubscribesip-communicator.dev.java.net
>     <mailto:dev-unsubscribesip-communicator.dev.java.net>
>     For additional commands, e-mail:
>     dev-helpsip-communicator.dev.java.net
>     <mailto:dev-helpsip-communicator.dev.java.net>
> 
> 

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
For additional commands, e-mail: dev-helpsip-communicator.dev.java.net


Re: Calling an applet from a jar library
user name
2007-05-09 09:56:05
	Is your use of S-C as an applet in a Web browser's VM now
working? SIP
works? To which SIP server? IM works? Any special
exceptions/failures
not reported with the application instance?


On Wed, 2007-05-09 at 16:47 +0200, JD wrote:
> The problem is that I had no error/exception message
when clicking on
> the button.
> After I tried to use the method init() from the
JMyApplet class and
> now it launches a dialog window with just error on it
and no message
> in the console which could be more explicit. 
> 
> 
> 
> 2007/5/9, Emil Ivov <emchoemcho.com>:
>         Hello Jean-Daniel,
>         
>         This looks strange indeed. I suspect that the
JMySpell.jar
>         might be
>         using packages that are either not imported by
your manifest
>         or are not
>         exported by any of the other bundles.
>         
>         In either case it would be easier to tell
what's going on if
>         you could 
>         send over the output of the error/exception
that you are
>         getting when
>         clicking on the button.
>         
>         Cheers
>         Emil
>         
>         francky vincent wrote:
>         > Hi devs,
>         >
>         > I tried to launch an applet which is in a
jar library from a
>         click on a 
>         > JButton.
>         > So I did put the .jar with my applet.class
and all the
>         dependancies in
>         > the lib/installer-exclude/ directory.
>         >
>         > In my actionPerformed(ActionEvent e) 
method, i make a call
>         to the 
>         > applet by creating a new instance of it :
JMyApplet ap = new
>         JMyApplet();
>         > I even set it visible with the
setVisible(true)  method but
>         nothing is
>         > launched.
>         > Whereas is a make a new instance of the
JDialog of the
>         exampleplugin, 
>         > i've got the window.
>         >
>         > Of course, I added : <zipfileset
>         src="${lib.noinst}/JMySpell.jar"
>         > prefix=""/>    into the
target tags.
>         >
>         > Have u any idea of what could cause the
problem ? 
>         >
>         > Jean-Daniel
>         
>        
------------------------------------------------------------
---------
>         To unsubscribe, e-mail:
>         dev-unsubscribesip-communicator.dev.java.net
>         For additional commands, e-mail:
>         dev-helpsip-communicator.dev.java.net
>         
> 
-- 

(C) Matthew Rubenstein

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
For additional commands, e-mail: dev-helpsip-communicator.dev.java.net


[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )