sikuli script in java

Asked by swethaa

hi ..
im trying a easy sikuli script in java using eclipse..
im gettin few errors
URLClassLoader$1.run() line: not available
AccessController.doPrivileged(PrivilegedExceptionAction<T>, AccessControlContext) line: not available [native method]Launcher$AppClassLoader(URLClassLoader).findClass(String) line: not available
Launcher$AppClassLoader(ClassLoader).loadClass(String, boolean) line: not available
Launcher$AppClassLoader.loadClass(String, boolean) line: not available
Launcher$AppClassLoader(ClassLoader).loadClass(String) line: not available
Launcher$AppClassLoader(ClassLoader).loadClassInternal(String) line: not available
Win32Util.setWindowOpaque(JWindow, boolean) line: 79
ScreenHighlighter.init() line: 175
ScreenHighlighter.<init>(Screen) line: 288
Screen.initBounds() line: 96
Screen.<init>() line: 108
Scriptsikuli.main(String[]) line: 7

this is my code
import org.sikuli.script.*;
public class Scriptsikuli {

        public static void main(String[] args) {
                Screen s = new Screen();
                try{
                        s.click("imgs/Lighthouse.jpg", 0);
                        s.wait("imgs/Tulips.jpg");
                        s.type(null, "hello world\n", 0);
                }
                catch(FindFailed e){
                        e.printStackTrace();
                }

        }
}

Pls help me fix

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

Supposing you are on Windows, make sure, that

path-to-sikuli\libs and path-to-java\jre6\bin

is in system path

Revision history for this message
swethaa (shwethaa-1988) said :
#2

hi all
    yes i had set..still havin trouble :(

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

Are you running the latest Java version?

In your Java test program in the beginning evaluate the content of environment and check system path (supposing you run the Java program from inside Eclipse with the run button)

Make a .jar from your program and run this from command line, to see what happens in this case.

Can you help with this problem?

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

To post a message you must log in.