python 2.7 - How to select java version for pyjnius -
i have java 1.6.0_17
installed in /usr/local/bin
. java
program compiled 1.7.0_11
.
pyjnius
fails in call x = autoclass('helloworld')
when helloworld.java
compiled 1.6
, works.
i cannot pyjnius
working 1.7
.
i've tried setting java_home
before importing jnius
:
import os os.environ['java_home'] = '/usr/local/pkgs/jdk-1.7.0.11' jnius import autoclass xx = autoclass('helloworld')
i've set java_home
in .bash_profile
, added /usr/local/pkgs/jdk-1.7.0.11/bin
first in path
.
pyjnius needs reinstalled in order configure new java environment. can done running following in downloaded or cloned pyjnius gihub project folder:
sudo python setup.py install
Comments
Post a Comment