Problem in linking Java file to python file

54 views
Skip to first unread message

Radhika Kulkarni

unread,
May 30, 2016, 10:58:02 AM5/30/16
to PyJNIus development ML
Hello,

I am developing a simple kivy application for speech recognition. It takes the input from the user and then switches to whichever application the user wants. eg: open WhatsApp should open the WhatsApp in user's phone.
For the switching, I have created a java file and I am using pyjnius for it's integration with the python file. 
When I run my application, it converts the speech to text but when it reaches the pyjnius part, it gives the error:

       Traceback (most recent call last):
   File "./main.py", line 172, in <module>
     Iris = autoclass('org.alpha.Iris')
   File "/usr/local/lib/python2.7/dist-packages/jnius/reflect.py", line 154, in autoclass
     c = find_javaclass(clsname)
   File "jnius/jnius_export_func.pxi", line 25, in jnius.find_javaclass (jnius/jnius.c:16655)
 jnius.JavaException: Class not found 'org/alpha/Iris'

where org.alpha.Iris is my package and Iris.java is my java file

What should I do?

Rémi Rampin

unread,
May 30, 2016, 4:11:42 PM5/30/16
to radsc...@gmail.com, pyjni...@googlegroups.com
2016-05-30 10:58 EDT, Radhika Kulkarni <radsc...@gmail.com>:
   File "./main.py", line 172, in <module>
     Iris = autoclass('org.alpha.Iris')
[...]
where org.alpha.Iris is my package and Iris.java is my java file

Should this be org.alpha.Iris.Iris then? "package.classname"...

-- 
Rémi

Saradhadevi Iyamperumal

unread,
Aug 10, 2019, 3:39:52 AM8/10/19
to PyJNIus development ML
Radhika, 

Now i am working on the speech recognition using pyjnius. but it is not working for me. I have created a pythonJavaclass with the speech recognition code using Pyjnius. For me, it throws error like , 'Permission denied for Kernel, permission denied on THP interfaces' like that. Do you have any idea. I am struggling with this for past 1 month. I dont find anyother error. I have attached my log file. Could you please help me.

Thanks,
Saradhadevi. I
Mylogcat.txt

Mathieu Virbel

unread,
Aug 31, 2019, 11:43:46 AM8/31/19
to pyjni...@googlegroups.com
Hi,

Filter your logcat on python, and/or read line by line.
There is "08-09 15:32:22.940 25532 25592 W TextToSpeech: setLanguage failed: not bound to TTS engine
08-09 15:32:22.941 25532 25592 I python  : Language not supported: LANG_NOT_SUPPORTED"

The language you set in your application is not supported by any TTS installed on your phone. So nothing is working.

--
You received this message because you are subscribed to the Google Groups "PyJNIus development ML" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyjnius-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyjnius-dev/aa7ec091-b529-486b-b6dc-932a5f386656%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages