[1.1.2+] Make a script runnable without a SikuliX installation

Created by RaiMan on on 2017-11-29
Last updated by:
RaiMan on on 2017-11-30

You can create a fat jar-file, that contains the scripting and SikuliX feature support together with the script folder content, that is runnable on systems only having a valid Java installation and no SikuliX setup. The script source is obfuscated, since it is only in compiled form (Java byte code), which leaves it unreadable for the normal user.

- to run your script jar:
java -jar <path-to-scriptname_sikuli.jar>

How to produce the fat jar:

- be sure you have run a setup with 1.1.2 (select option 1 and 2) built after 2017 Nov. 29th

- in the setup folder run
java -jar sikulixsetup-1.1.2-....jar scriptjar <path-to-your-script>

- if everything works, you get a scriptname_sikuli.jar in the same folder as your script and scriptname being the name of your script.

Be aware:
- with every script, that you pack this way, you get a jar that at least has 60MB
- this only works for one script folder currently

The feature is also available in the SikuliX IDE from the file menu as "Export to runnable jar". Though the production of the jar may last some 10 seconds, there is no progress indicator: you have simply to be patient and wait for the result popup (blind flight ;-).