← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #538792]: Need to use java in sikuli IDE

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
Of course this is possible, but you have to be aware, that Java is not a scripting language and it needs a separate compile step that generates the main classfile (using javac) and then run the classfile using the java command.
Another possibility would be, to take care, that the generated class file is found on current classpath and then just loaded with the class loader and run via reflection.

... but I do not really understand the need for Java as an extra
supported language, because in the Python/Jython script situation you
can do with Java, what ever you want.

On the other hand, if the need is the language, that people are used to, then I do not understand the use of the Sikuli IDE for programming Java with Sikuli features:
Just use your normal Java IDE (NetBeans, Eclipse, IntelliJ, ...) and use the SikuliX features as needed via the SikuliX API library jar.
For image creation/management you can still use the SikuliX IDE in parallel and add the image folders .sikuli via addImagePath().

If you decide to stay with your IDE approach, the starting point in the
IDE code is the ButtonRun implementation. The compile/run has to be
delegated to a subprocess.

BTW: The Sikuli IDE as such will not be further developed beyond version 1.1.x. 
In version 2 I will either rely on JEdit or Visual Studio Code  (not yet decided) with enhancing plugins and a standalone Image creation/management tool.

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