how to run sikuli without normal installation

Asked by Vikas

Hi,

I was trying to figure out a way to run Sikuli without actually installing it. & even not installing Java but copying the complete JRE installation files.

1) I tried to copy installed sikuli files on a different machine.
2) Modified Sikuli-IDE.ini to point to the custom folder on target system.
3) Sikuli-IDE.bat is modified to pick java 1.6, Javaw.exe
4) tried Sikuli-IDE.bat, Sikuli-IDE.exe but with no success.
5) Process is getting launched and displaying an error stating could not find main class program will exit.

Observations :-
1) I checked with process explorer that javaw.exe being launched is indeed from java 1.6 runtime itself.
2) If Sikuli-IDE.exe is being used instead of batch file it is directly searching in registry for the first time to find java 1.6
    2.1) From the second time onwards it is able to pick 1.6 Runtime folder but I donot know from where it is picking it.
3) I'm setting JAVA_HOME from a batch file.

 below is the command line output from where i triggered the commands. I'm even running

C:\RND\jre1.6.0_05\t1>test.bat
C:\RND\jre1.6.0_05\t1>set JAVA_HOME=C:\RND\jre1.6.0_05\t1

C:\RND\jre1.6.0_05\t1>bin\java.exe -version
java version "1.6.0_05"
Java(TM) SE Runtime Environment (build 1.6.0_05-b13)
Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode)

C:\RND\jre1.6.0_05\t1>cd ..\Sikuli\
C:\RND\jre1.6.0_05\Sikuli>Sikuli-IDE.bat

It would be great if someone can provide me insight of Sikuli, to workaround this situation.

Thanks,
-Vikas.

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Vikas
Solved:
Last query:
Last reply:
Revision history for this message
Vikas (pvssvikas) said :
#1

I even tried by defining CLASSPATH variable to execute Sikuli-IDE.bat, but with no success.

C:\RND\jre1.6.0_05\t1>echo %CLASSPATH%
C:\RND\jre1.6.0_05\Sikuli\jintellitype-1.3.2.jar;C:\RND\jre1.6.0_05\Sikuli\junit-3.8.1.jar;C:\RND\jre1.6.0_05\Sikuli\sikuli-ide.jar;C:\RND\jre1.6.0_05\Sikuli\sikuli-script.jar;C:\RND\jre1.6.0_05\Sikuli\swing-layout-1.0.1.jar;C:\RND\jre1.6.0_05\Sikuli\commons-cli-1.2.jar;

Revision history for this message
RaiMan (raimund-hocke) said :
#2

As far as I know, you have to take the portable version (...zip) as a base, where you have to start sikuli using the .bat.
Next you have to use a portable version of java (Google: portable java)

Put both on a stick or in a directory (to be sure, it should be a machine, that does not have java and Sikuli)

Then just modify Sikuli-IDE.bat so that java.exe is taken from the portable version directory. you may delete the @echo off to see everything. Go to the portable Sikuli directory and start the modified .bat.

Worked for me with Win7 and WinXP (with the latest java version and Sik10.2)

Revision history for this message
Vikas (pvssvikas) said :
#3

Hi,

Thanks for taking time in responding to my query.
can you please let me know where i can find portable version of sikuli ?

Thanks,
-Vikas.

Revision history for this message
Vikas (pvssvikas) said :
#4

Hi,

Thanks for taking time in responding to my query.
can you please let me know where i can find portable version of sikuli ?

Thanks,
-Vikas.

On Mon, Oct 11, 2010 at 10:42 PM, RaiMan <
<email address hidden>> wrote:

> Your question #128820 on Sikuli changed:
> https://answers.launchpad.net/sikuli/+question/128820
>
> Status: Open => Answered
>
> RaiMan proposed the following answer:
> As far as I know, you have to take the portable version (...zip) as a base,
> where you have to start sikuli using the .bat.
> Next you have to use a portable version of java (Google: portable java)
>
> Put both on a stick or in a directory (to be sure, it should be a
> machine, that does not have java and Sikuli)
>
> Then just modify Sikuli-IDE.bat so that java.exe is taken from the
> portable version directory. you may delete the @echo off to see
> everything. Go to the portable Sikuli directory and start the modified
> .bat.
>
> Worked for me with Win7 and WinXP (with the latest java version and
> Sik10.2)
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/sikuli/+question/128820/+confirm?answer_id=1
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/sikuli/+question/128820
>
> You received this question notification because you are a direct
> subscriber of the question.
>

Revision history for this message
RaiMan (raimund-hocke) said :
#5

just download the zipped package and don't use the contained .exe - use the .bat instead and tailor it to your needs.
http://launchpad.net/sikuli/trunk/0.10.2/+download/Sikuli-IDE-win32-0.10.2.zip

Revision history for this message
Vikas (pvssvikas) said :
#6

Thanks for the workaround. I'll work with it.

Revision history for this message
Jeff Sant (sant-jeff) said :
#7

Dear Friends,

I downloaded this file and there is no java inside the zipped package, will it still work by only extracting it in any computer which there is no or old version of java installed?

Thanks

Revision history for this message
RaiMan (raimund-hocke) said :
#8

@Jeff
this was based on the latest version of Sikuli before Sikuli X.

look comment #2, how to do this with the zipped version of the current version (which never contains any Java system).

To run, Sikuli always needs a Java Runtime Environment, but it does not matter, how you manage to get it n the machine, before using Sikuli.

Revision history for this message
Jeff Sant (sant-jeff) said :
#9

Dear Raiman,

Thanks for the reply.

So that means, after install JRE, we just need to copy the zip contents to a folder and run the bat file along with the path of .skl and it will do the job?

Thanks

Revision history for this message
RaiMan (raimund-hocke) said :
#10

@Jeff

the standard path entries are also needed:

path-to-sikuli-installation-directory\libs;path-to-java-installation-directory\jre6\bin

this might be added to the .bat.

Revision history for this message
paramveer (paramveer-mca) said :
#11

Can i successfully use sikuli if create a installer which just paste sikuli Jar files and DLL file under the programfile folder and install java also on the same machine. Or i need to register sikuli DLL files or any thing else in registry to work with sikuli.

If there is any workaround or any other way please suggest.

Thanks in advance

Appreciate experts Responses.

Revision history for this message
RaiMan (raimund-hocke) said :
#12

@ paramveer

--- a minimum Sikuli setup to run Sikuli scripts:

Windows:

--- Sikuli program folder
C:\Program Files\Sikuli X
must contain sikuli-script.jar

--- Sikuli DLL folder
C:\Program Files\Sikuli X\libs
must contain the content of the libs folder of a complete installation

--- System path entries needed
C:\Program Files\Sikuli X\libs
C:\Program Files\Java\jre6

--- optional environment variable
%SIKULI_HOME% = C:\Program Files\Sikuli X\
with trailing backslash

C:\Program Files\Sikuli X
can be any other folder, as long as the environment is set correctly.

--- run a script
java -jar sikuli-script.jar path-to-some.sikuli

Revision history for this message
RaiMan (raimund-hocke) said :
#13

sorry, I have to correct:

java -jar C:\Program Files\Sikuli X\sikuli-script.jar path-to-some.sikuli

if you do not have a class path setting for sikuli-script.jar somewhere in the Java environment.