pyjnius

Jnius installation bug, “Unable to determine JDK_HOME”

青春壹個敷衍的年華 提交于 2019-12-11 08:58:52
问题 I tried to install jnius Python module by typing 'pip install jnius' in CMD. This is the message I got: Complete output from command python setup.py egg_info: Traceback (most recent call last): File "<string>", line 1, in <module> File "c:\users\sm\appdata\local\temp\pip-install-vu2sb5\jnius\setup.py", line 111, in <module> raise Exception('Unable to determine JDK_HOME') Exception: Unable to determine JDK_HOME ---------------------------------------- Command "python setup.py egg_info" failed

How to install Pyjnius on ubuntu 16.04 64 bit

≯℡__Kan透↙ 提交于 2019-12-08 09:54:38
问题 Who can guide me step by step I am a beginner and I trying to figure out how to install pyjnius. Thank You Regards. 回答1: Pyjnius depends on Cython and Java. Assuming that you already have Java installed. Please do the following: su pip install cython pip install pyjnius Example - Installation A minimal Pyjnius example 来源: https://stackoverflow.com/questions/46367417/how-to-install-pyjnius-on-ubuntu-16-04-64-bit

Kivy and android sharedpreferences

≯℡__Kan透↙ 提交于 2019-12-06 10:05:01
问题 I am looking for a method to store settings persistently on android device, from Kivy framework. I found Kivy documentation, overall informative, vague in this particular area. It mentions three methods ( sorry, dont have enough reputation to provide clicable links, relative paths to kivy.org provided, I'd be glad if someone could fix those links ): [Storage] ./docs/api-kivy.storage.html#module-kivy.storage [Settings] ./docs/api-kivy.uix.settings.html [Config] ./docs/api-kivy.config.html In

kivy android share image

て烟熏妆下的殇ゞ 提交于 2019-12-05 16:58:05
I want to create share button that will use android ACTION_SEND intent for sharing image. It's my code: from kivy.setupconfig import USE_SDL2 def share(path): if platform == 'android': from jnius import cast from jnius import autoclass if USE_SDL2: PythonActivity = autoclass('org.kivy.android.PythonActivity') else: PythonActivity = autoclass('org.renpy.android.PythonActivity') Intent = autoclass('android.content.Intent') String = autoclass('java.lang.String') Uri = autoclass('android.net.Uri') File = autoclass('java.io.File') shareIntent = Intent(Intent.ACTION_SEND) shareIntent.setType('"image

JRE_HOME not found on pip jnius installation

不羁的心 提交于 2019-12-04 04:33:22
问题 Trying to install jnius from pip (it is a requirement to pip install sikuli ). This is the error I get when I am trying to install: Are the variables correctly defined? Does anyone understand why it keeps saying that it can't find JRE_HOME ? Edit: My path variable is: 回答1: The setup.py contains: jdk_home = environ.get('JDK_HOME') if not jdk_home: jdk_home = subprocess.Popen('readlink -f /usr/bin/javac | sed "s:bin/javac::"', shell=True, stdout=subprocess.PIPE).communicate()[0].strip() if not

Practical use of Java class/JAR in Python?

亡梦爱人 提交于 2019-12-02 04:33:34
问题 I spent significant amount of time looking for this and explore many solutions. This is related to this thread. Calling Java from Python In the end, after testing: Pyjnius : Cannot install in Windows. Py4J: can install on windows, but using Gateway is a bit heavy. JPype: Python 3 installed in 5 mins, can load 50Mo JAR without any issues. Good thing is the syntax is completely merged with Python syntax... https://github.com/tcalmant/jpype-py3 Just Wondering, if any people has developed real

Practical use of Java class/JAR in Python?

僤鯓⒐⒋嵵緔 提交于 2019-12-02 01:37:34
I spent significant amount of time looking for this and explore many solutions. This is related to this thread. Calling Java from Python In the end, after testing: Pyjnius : Cannot install in Windows. Py4J: can install on windows, but using Gateway is a bit heavy. JPype: Python 3 installed in 5 mins, can load 50Mo JAR without any issues. Good thing is the syntax is completely merged with Python syntax... https://github.com/tcalmant/jpype-py3 Just Wondering, if any people has developed real world wrapping application of Java in Python (ie running on a production server) with big size JAR ? To

JRE_HOME not found on pip jnius installation

孤者浪人 提交于 2019-12-01 22:06:00
Trying to install jnius from pip (it is a requirement to pip install sikuli ). This is the error I get when I am trying to install: Are the variables correctly defined? Does anyone understand why it keeps saying that it can't find JRE_HOME ? Edit: My path variable is: The setup.py contains: jdk_home = environ.get('JDK_HOME') if not jdk_home: jdk_home = subprocess.Popen('readlink -f /usr/bin/javac | sed "s:bin/javac::"', shell=True, stdout=subprocess.PIPE).communicate()[0].strip() if not jdk_home: raise Exception('Unable to determine JDK_HOME') jre_home = environ.get('JRE_HOME') if not jre_home