Import Java Class to the designer Ignition

Hi! everybody

i have a problem , wrote jar and need using in designer for ejecute in button by script, i have compile it and run de pack200 to generare of jar.pack.gz . place file in core/lib/commom also core/lib/designer but no work.

i try witch follow code

def Asterisk():
from ignitionphone (this is mi package) import HelloManager (this is my class)
originate = HelloManager().run
call = Asterisk()

send this error

raceback (most recent call last):
File “”, line 5, in
File “”, line 2, in Asterisk
ImportError: No module named ignitionphone

Can you upload your JAR file somewhere for us to look at?

Hi Kevin, thanks for you asnwer

https://drive.google.com/open?id=1mpEwzzd9FfBdL1tmlNwgCXziHvvMkcEv

This place both files on file!

regards!!

Not only do you have additional jar files inside your jar file, which is not going to do what you’re hoping, you’ve placed your classes in a package called ignition.phone.ignitionphone rather than just ignitionphone like you’re referencing in the script.

1 Like

Hi Kevin! as they say here SOS UN CRAK :smiley: , finally i see the class in designer, i now understand so so how work.

in my .jar missing a class java.util , i change de code python for this

def Asterisk():
from ignition.phone.ignitionphone import HelloManager
originate = HelloManager().run

call = Asterisk()

as send

line 2, in Asterisk
java.lang.NoClassDefFoundError: org/asteriskjava/manager/action/ManagerAction

Thanks Bro!!!

1 Like