← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #402573]: Compile Issue with Jython, java context

 

Question #402573 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/402573

Description changed to:
Hi, could you please assist.

When using


I tried  from sikuli import * and did not get any errors, however as I want to use Sikuli in a jython program I used, as recommended:

import org.sikuli.script.SikulixForJython
from sikuli import *

I receive the following error:
[error] RunTimeINIT:  *** terminating: no valid Java context for SikuliX available (java.security.CodeSource.getLocation() is null


I set the path to sikuliapi with 
sys.append

The program works flawlessly in Eclipse, however after moving to command line I started getting this error.
When I put the sikuliapi on the classpath, Sikuli is not found. My Java also seems to be working correctly as java -jar is recognized when I type it into command prompt.

I am using jython mymodule.py currently when compiling as I am trying to
test my modules. I am compiling non sikuli modules flawlessly, only
modules  with import org.sikuli are giving me this issue. I have tried
it on multiple computers.

I am not sure what I am doing wrong, I have run through the forum, but
changing the class path isn't working, I even tried dropping Sikulixapi
into the java and later on jythonpaths.

This was also attempted

os.environ['classpath'] =  path to sikuli


os.environ['JYTHONPATH'] = path to sikuli

os.environ['PYTHONPATH'] = path to sikuli

-D.python = path to sikuli also didn't do the trick.


*I am using Windows 7 & 8
Regards

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.