How to launch Sikuli's bundled Jython on a Windows 64Bit system? --- Use SysWOW64

Asked by pyCoder

*** solution see comment #9

----------------------------------------------

Okay so my company is switching to 64 bit windows 7 machines. They got me a test setup early so i can prepare for the transition. So now i have to update my scripts to work in the new environment. i have it working in eclipse just fine. but when i did a deployment test i had issues. The script works in eclipse but not on my machine through the launcher. i buid all my scripts to sit in a location on the network. i delpoy it to my users by giving them a short cut that starts the scripts. i also build my script at the Jython layer aka no ".sikuli" folders.

when i get to work i'll post more specifics.

%SystemRoot%/java -cp "path-to-sikuli-script.jar" org.python.utl "path-to-script"

the above short cut options don't seem to work anymore. i get errors.

%SystemRoot%/java -d32 -cp "path-to-sikuli-script.jar" org.python.utl "path-to-script"

i have tryied to specify the 32bit jvm but still no luck.

anyideas how i can get this short cut arguments working?

PS: Hi raiman it's me eliteSKL... i forgot my password and so now i have new account.

Question information

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

Please respond in this post. the post before was suppose to be an edit, but instead it double posted..

sorry for double post.

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

welcome back - pyCoder sounds nice as well ;-)

I guess you meant (some typo ;-)

%SystemRoot%/java -cp "path-to-sikuli-script.jar" org.python.util.jython "path-to-script.py"

which uses Sikuli's bundled jython, to run a script.py.

On Win 7 64Bit, you need a JRE 32Bit INSTALLED AND USED by Sikuli.

So only specifying -d32 to the 64Bit JVM is not enough.

So make sure, that you have something like:

"path-to-32Bit-JRE"/bin/java -cp "path-to-sikuli-script.jar" org.python.util.jython "path-to-script.py"

Revision history for this message
pyCoder (validcode-ye) said :
#3

when i get to work i'll paste in the exact comand string and exact error message. i was messing with it all day friday.. it's hard to work from memory. thanks.

Revision history for this message
pyCoder (validcode-ye) said :
#4

this seems to work. trying to get my dependencys to find them selfs so i can conferm this. but i get the sikuli loading outputs.
C:\Windows\SysWOW64\java.exe -cp "C:\Program Files (x86)\Sikuli X\sikuli-script.jar" org.python.util.jython "Path-to-my-script"

this throws unstaisfied link error can't load 32 bit dll on a amd 64bit platform.
C:\Windows\SysWOW64\java.exe -cp "C:\Program Files (x86)\Sikuli X\sikuli-script.jar" org.python.util.jython "Path-to-my-script"

Revision history for this message
pyCoder (validcode-ye) said :
#5

i meant this throws the error.... had had my coffee yet

%SystemRoot%/java -cp "path-to-sikuli-script.jar" org.python.util.jython "path-to-script.py"

%SystemRoot% == C:\windows\System32

so the one below was my orginal that now throws errors.

C:\Windows\System32\java.exe -cp "path-to-sikuli-script.jar" org.python.util.jython "path-to-script.py"

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

You are still running in 64 Bit java mode.

Again: you need a JRE 6 32Bit version on your system, which is normally installed into

C:\Program Files (x86)\Java

From there you have to use the java.exe

C:\Program Files (x86)\Java\bin\Java.exe

This should work.

Revision history for this message
pyCoder (validcode-ye) said :
#7

windows 7 both jvm's installed this below works for short cut.
C:\Windows\SysWOW64\java.exe -cp "C:\Program Files (x86)\Sikuli X\sikuli-script.jar" org.python.util.jython "path-to-script"

Revision history for this message
pyCoder (validcode-ye) said :
#8

i have both jvm's installed and both jdk's all are 6-30 the latested. but i figured it out:

this works
C:\Windows\SysWOW64\java.exe -cp "C:\Program Files (x86)\Sikuli X\sikuli-script.jar"

this throws link error
C:\Windows\System32\java.exe -cp "path-to-sikuli-script.jar" org.python.util.jython "path-to-script.py"

Revision history for this message
pyCoder (validcode-ye) said :
#9

i have both jvm's installed and both jdk's all are 6-30 the latested. but i figured it out:

this works
 C:\Windows\SysWOW64\java.exe -cp "C:\Program Files (x86)\Sikuli X\sikuli-script.jar" org.python.util.jython "path-to-script.py"

this throws link error
 C:\Windows\System32\java.exe -cp "path-to-sikuli-script.jar" org.python.util.jython "path-to-script.py"

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

Thanx, again learned something new: WOW ;-)
Never heard about that before.

But now I know and will have a look at it on my Win 7 64-Bit.