Cannot run Eclipse.exe from Sikuli

Asked by Andrey Botalov

I have 64-bit windows, 32-bit JDK, 32-bit Eclipse.
I wrote the following Sikuli Script:
eclipse = App.open("C:\\Program Files (x86)\\eclipse\\eclipse.exe")
When I run it this error appears:
"A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse. No Java virtual machine was found after searching the following locations:
C:\Program Files (x86)\eclipse\jre\bin\javaw.exe
javaw.exe in your current PATH"

When I start Eclispe by clicking eclipse.exe it starts normally (without any error). I tried to edit eclipse.ini. If eclipse.ini file is invalid error "Failed to create Java Virtual Machine" is shown when opening by clicking eclipse.exe. But even in that case error "A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse. ..." is still shown so it seems that SIKULI doesn't use eclipse.ini or Path environmental variable.

It seems that SIKULI opens applications in other way than it does Windows. I'm unable to run Eclipse from SIKULI. How can I solve it?

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

Just tested on my Win7 32-Bit.

App.open("C:\\Program Files\\eclipse\\eclipse.exe")

works fine.

So it must have something to do with your Eclipse/Java configuration in your mixed 64Bit/32Bit environment.

This looks strange:
No Java virtual machine was found after searching the following locations:
C:\Program Files (x86)\eclipse\jre\bin\javaw.exe

Why is the JRE searched inside of Eclipse?

Who is throwing the error?

Sikuli does not do anything else, than starting a new process with eclipse.exe. The rest is in the responsibility of the app.

You might use the latest build of rc3, since it allows to use command line parameters with App.open().
Look in the updated docs(http://sikuli.org/docx/globals.html#controlling-applications-and-their-windows).

(http://sikuli.org/download.shtml#last-build)

So you might use
App.open("java -version")
to see, what happens.

Can you help with this problem?

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

To post a message you must log in.