Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'JAVA_HOME' #5

Open
metulburr opened this issue Apr 19, 2017 · 5 comments
Open

KeyError: 'JAVA_HOME' #5

metulburr opened this issue Apr 19, 2017 · 5 comments

Comments

@metulburr
Copy link

metulburr commented Apr 19, 2017

installed jdk package openjdk-8-jdk for ubuntu

metulburr@ubuntu:~/Downloads/android-zbar-qrcode-master$ python main.py 
[INFO   ] [Logger      ] Record log in /home/metulburr/.kivy/logs/kivy_17-04-19_1.txt
[INFO   ] [Kivy        ] v1.9.1
[INFO   ] [Python      ] v2.7.12 (default, Nov 19 2016, 06:48:10) 
[GCC 5.4.0 20160609]
[INFO   ] [Factory     ] 179 symbols loaded
[INFO   ] [Image       ] Providers: img_tex, img_dds, img_gif, img_sdl2, img_pil (img_ffpyplayer ignored)
 Traceback (most recent call last):
   File "main.py", line 28, in <module>
     from jnius import autoclass, PythonJavaClass, java_method, cast
   File "/home/metulburr/.local/lib/python2.7/site-packages/jnius/__init__.py", line 13, in <module>
     from .reflect import *  # noqa
   File "/home/metulburr/.local/lib/python2.7/site-packages/jnius/reflect.py", line 14, in <module>
     class Class(with_metaclass(MetaJavaClass, JavaClass)):
   File "/usr/lib/python2.7/dist-packages/six.py", line 808, in __new__
     return meta(name, bases, d)
   File "jnius/jnius_export_class.pxi", line 43, in jnius.MetaJavaClass.__new__ (jnius/jnius.c:17219)
   File "jnius/jnius_export_class.pxi", line 65, in jnius.MetaJavaClass.resolve_class (jnius/jnius.c:17615)
   File "jnius/jnius_env.pxi", line 11, in jnius.get_jnienv (jnius/jnius.c:3320)
   File "jnius/jnius_jvm_dlopen.pxi", line 90, in jnius.get_platform_jnienv (jnius/jnius.c:3248)
   File "jnius/jnius_jvm_dlopen.pxi", line 45, in jnius.create_jnienv (jnius/jnius.c:2647)
   File "/usr/lib/python2.7/UserDict.py", line 40, in __getitem__
     raise KeyError(key)
 KeyError: 'JAVA_HOME'
@bulletforyou
Copy link

how did you solve your problem?

@sarrabb
Copy link

sarrabb commented Feb 21, 2018

i'm having the same problem can you tell me how did you fix it ??

@GoBig06
Copy link

GoBig06 commented Mar 23, 2018

I had a JAVE_HOME key issue too and fixed it by setting the jdk path in the etc/environment file 'JAVE_HOME=PATH/TO/YOUR/JDK/bin'

@JuggernautPanda
Copy link

Same issue. :( No fix yet.

@blu-base
Copy link

For future reference:
Had the same issue. My system defaults to openjdk11. However, the android sdk didn't work with that version. I set JAVA_HOME to java 8' jdk, such as:
export JAVA_HOME=/usr/lib64/jvm/jre-1.8.0-openjdk/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants