← Back to team overview

sikuli-driver team mailing list archive

[Question #260380]: java.awt.HeadlessException on Mac OS

 

New question #260380 on Sikuli:
https://answers.launchpad.net/sikuli/+question/260380

Everything works fine on Windows but on Mac OS error appears

Code:
import sys
from jpype import *

def startJVM1():

    JVM = getDefaultJVMPath()
    startJVM(JVM, '-ea',"-Djava.class.path=sikuli-java.jar",  '-Djava.awt.headless=true')
    sikuli = JPackage("org.sikuli.script")
    login_window=sikuli.Pattern("con.png")
    window = sikuli.Screen()
    window.click(login_window)
    shutdownJVM()


Error:
 window = sikuli.Screen()
  File "/Library/Python/2.7/site-packages/jpype/_jclass.py", line 79, in _javaInit
    self.__javaobject__ = self.__class__.__javaclass__.newClassInstance(*args)
jpype._jexception.UnsupportedOperationExceptionPyRaisable: java.awt.HeadlessException

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.