← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #295298]: How to add Image file in jar file

 

Question #295298 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/295298

Description changed to:
Hi,

I have added res folder and under that i have images folder and added
all images inside that folder. so the structure is:

TPIM Project (main project)
   src
     TPIM (package)
       TPIM.java
   res   (
     Images
       all images.png

src and res is in same level and both are resource folder.

here's the code:

		Pattern Username=new Pattern("res/Images/UserName.PNG"); 
		Pattern Password=new Pattern("res/Images/Password.PNG"); 

When i run it using eclipse it works fine, but when i make executable
file/jar file, it doesn't recognize the username and password images.
But i can see images folder in the jar file (when i open it using
winrar).

Please suggest some solution. I am new with selenium, eclipse and
sikuli. I have checked lots of website but could not find any ans. I
have also check similar question in your website but that didn't solve
my issue.

Thanks.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.