[1.0.1] Windows: problems with libs folder when running a .exe made with Launch4J

Asked by Prashanthan Subramaniyam

I used sikuli-script to use java program. I set two environment variables in to the eclips IDE . I'm Using Windows XP

Environment ariables
 1) PATH = ${workspace_loc:/Sikuli/sikuli-ide/libs}
 2) SIKULI_HOME = ${workspace_loc:/Sikuli/sikuli-ide}

After that i run the program on eclips its working properly.
Next i create the executable file (.exe) using "Launge4j".

I run the .exe file from Command prompt. After that following errors occurred.

Error Message -->
[error] ResourceLoaderBasic: check: libs dir is empty, has wrong content or is outdated

[action] ResourceLoaderBasic: check: Please wait! Trying to extract libs to: C:\Documents and Settings\Dell\SikuliX\libs

[error] ResourceLoaderBasic: loadLib: Fatal Error 109: not found: C:\Documents and Settings\Dell\SikuliX\libs\WinUtil.dll

[error] Terminating SikuliX after a fatal error(109)! Sorry, but it makes no sense to continue!
If you do not have any idea about the error cause or solution, run again
with a Debug level of 3. You might paste the output to the Q&A board.

Go through this link and read my question for more details --> http://stackoverflow.com/q/21621000/2560448

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

answered on stack overflow ;-)

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

BTW: version 1.1.0 will have options, to create a fat jar, that can be run by just double clicking and contains everything including the images.

Revision history for this message
Prashanthan Subramaniyam (arspprashanthan) said :
#3

Dear @RaiMan (raimund-hocke) I just added sikuli-java.jar to Referenced Libraries you mentioned in stack overflow.

Then I Set a JVM option -Dsikuli.Debug=3 from Launch4j JVM options list under JRE tab.

But still same error occurred.

Error Message -->

C:\Documents and Settings\Dell\Desktop\Project\exe1>test.exe
[debug] Screen: initScreens: basic initialization (1 Screen(s) found)
[debug] *** monitor configuration (primary: 0) ***
[debug] Screen 0: S(0)[0,0 1360x768]
[debug] *** end monitor configuration ***
[debug] ResourceLoaderBasic: SikuliX Package Build: 1.0.1 12SEP2013160242
[debug] ResourceLoaderBasic: check: we are running on arch: x86
[debug] ResourceLoaderBasic: check: using Java at: C:/Program Files/Java/jre7/
[debug] ResourceLoaderBasic: check: not running from jar: C:/Documents and Settings/Dell/Desktop/Project/exe1/
[debug] ResourceLoaderBasic: check: Exists libs folder in user home folder? YES: C:\Documents and Settings\Dell\SikuliX\libs
[debug] ResourceLoaderBasic: checkLibsDir: C:\Documents and Settings\Dell\SikuliX\libs
[error] ResourceLoaderBasic: check: libs dir is empty, has wrong content or is outdated
[action] ResourceLoaderBasic: check: Please wait! Trying to extract libs to: C:\Documents and Settings\Dell\SikuliX\libs
[debug] ResourceLoaderBasic: extractLibs: accessing folder: C:\Documents and Settings\Dell\Desktop\Project\exe1\test.exe\META-INF\libs\windows\libs32
[debug] ResourceLoaderBasic: extractLibs: Found 0 file(s) in META-INF/libs/windows/libs32/
[debug] ResourceLoaderBasic: export: Trying to access package
[debug] ResourceLoaderBasic: export: accessing folder: C:\Documents and Settings\Dell\Desktop\Project\exe1\test.exe\META-INF\libs\tessdata
[debug] ResourceLoaderBasic: export: Found 0 file(s) in META-INF/libs/tessdata
[debug] ResourceLoaderBasic: checkLibsDir: C:\Documents and Settings\Dell\SikuliX\libs
[debug] ResourceLoaderBasic: export: Using this as OCR directory (tessdata) too
[debug] ResourceLoaderBasic: loadLib: WinUtil
[error] ResourceLoaderBasic: loadLib: Fatal Error 109: not found: C:\Documents and Settings\Dell\SikuliX\libs\WinUtil.dll
[error] Terminating SikuliX after a fatal error(109)! Sorry, but it makes no sense to continue!
If you do not have any idea about the error cause or solution, run again
with a Debug level of 3. You might paste the output to the Q&A board.
[debug] SikuliXFinal: cleanUp: 0

In Launch4j how can i set the Environment variable.
Go through this link and read my question for more details --> http://stackoverflow.com/q/21626676/2560448

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

debug] ResourceLoaderBasic: check: not running from jar: C:/Documents and Settings/Dell/Desktop/Project/exe1/

[debug] ResourceLoaderBasic: extractLibs: accessing folder: C:\Documents and Settings\Dell\Desktop\Project\exe1\test.exe\META-INF\libs\windows\libs32
[debug] ResourceLoaderBasic: extractLibs: Found 0 file(s) in META-INF/libs/windows/libs32/
[debug] ResourceLoaderBasic: export: Trying to access package
[debug] ResourceLoaderBasic: export: accessing folder: C:\Documents and Settings\Dell\Desktop\Project\exe1\test.exe\META-INF\libs\tessdata
[debug] ResourceLoaderBasic: export: Found 0 file(s) in META-INF/libs/tessdata

the structure off the exe do not fit, to what a SikuliX jar expects.
So this will not work with 1.0.1

I will have a look at it together with version 1.1.0

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

I just had a look at Launch4J: I will not support this for SikuliX.

Version 1.1.0 will have a feature, to wrap an app together with everything needed including images into a jar, that can be run by simply double-clicking.

Revision history for this message
Prashanthan Subramaniyam (arspprashanthan) said :
#6

Thank you for your kind reply RaiMan (raimund-hocke) . Yeah launch4J not support for sikuli version 1.0.1 . Then I tried exe4J(Executable .EXE creating tool) first time that exe working properly but after that it doesn't work. Following errors occurred.

Error Message -->

C:\Documents and Settings\Dell\Desktop\arsp\exe>test2.exe

[error] ResourceLoaderBasic: check: No valid libs path available until now!
[action] ResourceLoaderBasic: check: Please wait! Trying to extract libs to jar
parent folder: C:/Documents and Settings/Dell/Local Settings/Temp/e4j125.tmp_dir1392201880/
[error] ResourceLoaderBasic: checkLibsDir: libs dir is not on system path: C:\Documents and Settings\Dell\Local Settings\Temp\e4j125.tmp_dir1392201880\libs
[action] ResourceLoaderBasic: checkLibsDir: Please wait! Trying to add it to user's path

[info] runcmd: reg QUERY HKCU
[info] runcmd: reg QUERY HKEY_CURRENT_USER\Environment /v PATH
[info] runcmd: reg ADD HKEY_CURRENT_USER\Environment /v PATH /t REG_EXPAND_SZ /f
 /d "C:\Documents and Settings\Dell\Local Settings\Temp\e4j125.tmp_dir13922018
80\libs;C:\Documents and Settings\Dell\Local Settings\Temp\e4j11E.tmp_dir13922
01598\libs;C:\Documents and Settings\Dell\Local Settings\Temp\e4jE2.tmp_dir139
2200610\libs;C:\Documents and Settings\Dell\Local Settings\Temp\e4jDE.tmp_dir1
392200550\libs;C:\Documents and Settings\Dell\Desktop\sikuli java exe1\libs;C:
\Documents and Settings\Dell\Local Settings\Temp\e4jD2.tmp_dir1392200334\libs;
C:\Documents and Settings\Dell\Local Settings\Temp\e4jBC.tmp_dir1392199480\libs"

[info] runcmd: reg QUERY HKEY_CURRENT_USER\Environment /v PATH
[error] ResourceLoaderBasic: checkLibsDir: Successfully added the libs folder to users PATH!
RESTART all processes/IDE's using Sikuli for new PATH to be used!/nFor usages from command line logout/login might be necessary!

[error] Terminating SikuliX after a fatal error! Sorry, but it makes no sense to continue!
If you do not have any idea about the error cause or solution, run again
with a Debug level of 3. You might paste the output to the Q&A board.

Another issue is after this error message i directly delete the SikuliX folder and I download the new sikuli-setup from this site --> https://launchpad.net/sikuli/+download and installed. but sikuli-script.jar and some files are missing. so how can i uninstall the sikuli and re install. please help me.

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

[error] ResourceLoaderBasic: checkLibsDir: Successfully added the libs folder to users PATH!
RESTART all processes/IDE's using Sikuli for new PATH to be used!/nFor usages from command line logout/login might be necessary!

--- just do, what it is saying: logout/login or even restart

-- I download the new sikuli-setup
delete everything from previous trials (except sikuli-setup.jar) and run setup again.

Can you help with this problem?

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

To post a message you must log in.