Need to use java in sikuli IDE

Asked by umesh

We are interested in using same sikuli IDE with supporting java language. We want to create sikuli IDE to support java. Is there any way to directly change the supporting language for sikuli IDE by going inside code ?
I have made many changes in sikuli IDE code as per our company requirements to ease test case writing. Just need to add run implementation for java code in IDE.

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

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.

Can you help with this problem?

Provide an answer of your own, or ask umesh for more information if necessary.

To post a message you must log in.