问题:~$ sikuli-ide -h
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/cli/ParseException at org.sikuli.ide.SikuliIDE.main(SikuliIDE.java:919)Caused by: java.lang.ClassNotFoundException: org.apache.commons.cli.ParseException at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
解决办法:
cat /usr/bin/sikuli-ide
#!/bin/sh
LC_NUMERIC=C exec /usr/bin/java \
-cp \
/usr/share/java/guava.jar:\
/usr/share/java/jnr-posix.jar:\
/usr/share/java/jaffl.jar:\
/usr/share/java/jna.jar:\
/usr/share/java/asm3.jar:\
/usr/share/java/asm3-commons.jar:\
/usr/share/java/antlr3-runtime.jar:\
/usr/share/java/jnr-constants.jar:\
/usr/share/java/jnr-ffi.jar:\
/usr/share/java/jython.jar:\
/usr/share/java/commons-cli.jar:\
/usr/share/java/JXGrabKey.jar:\
/usr/share/java/json-simple.jar:\
/usr/share/java/swing-layout.jar:\
/usr/share/java/swingx-core.jar:\
/usr/share/java/jgoodies-common.jar:\
/usr/share/java/forms.jar:\
/usr/share/java/mac_widgets.jar:\
/usr/share/java/junit.jar:\
/usr/share/sikuli/sikuli-ide.jar:\
/usr/share/java/sikuli-script.jar \
-Dsikuli.console=true \
-Dsikuli.debug=0 \
-Xms64M -Xmx512M \
-Dfile.encoding=UTF-8 \
-Dpython.home=/usr/share/jython \
-Dpython.path="/usr/share/sikuli/Lib" \
-Dpython.cachedir=$HOME/.jython-cache \
org.sikuli.ide.SikuliIDE "$@"
file /usr/share/java/guava.jar /usr/share/java/jnr-posix.jar /usr/share/java/jaffl.jar /usr/share/java/jna.jar /usr/share/java/asm3.jar /usr/share/java/asm3-commons.jar /usr/share/java/antlr3-runtime.jar /usr/share/java/jnr-constants.jar /usr/share/java/jnr-ffi.jar /usr/share/java/jython.jar /usr/share/java/commons-cli.jar /usr/share/java/JXGrabKey.jar /usr/share/java/json-simple.jar /usr/share/java/swing-layout.jar /usr/share/java/swingx-core.jar /usr/share/java/jgoodies-common.jar /usr/share/java/forms.jar /usr/share/java/mac_widgets.jar /usr/share/java/junit.jar /usr/share/sikuli/sikuli-ide.jar /usr/share/java/sikuli-script.jar
/usr/share/java/guava.jar: Zip archive data, at least v2.0 to extract
/usr/share/java/jnr-posix.jar: Zip archive data, at least v2.0 to extract
/usr/share/java/jaffl.jar: cannot open `/usr/share/java/jaffl.jar' (No such file or directory)
/usr/share/java/jna.jar: cannot open `/usr/share/java/jna.jar' (No such file or directory)
/usr/share/java/asm3.jar: symbolic link to asm3-3.3.2.jar
/usr/share/java/asm3-commons.jar: symbolic link to asm3-commons-3.3.2.jar
/usr/share/java/antlr3-runtime.jar: cannot open `/usr/share/java/antlr3-runtime.jar' (No such file or directory)
/usr/share/java/jnr-constants.jar: Zip archive data, at least v2.0 to extract
/usr/share/java/jnr-ffi.jar: Zip archive data, at least v2.0 to extract
/usr/share/java/jython.jar: symbolic link to jython-2.5.3.jar
/usr/share/java/commons-cli.jar: cannot open `/usr/share/java/commons-cli.jar' (No such file or directory)
/usr/share/java/JXGrabKey.jar: symbolic link to JXGrabKey-0.3.2.jar
/usr/share/java/json-simple.jar: cannot open `/usr/share/java/json-simple.jar' (No such file or directory)
/usr/share/java/swing-layout.jar: symbolic link to swing-layout-1.0.4.jar
/usr/share/java/swingx-core.jar: Zip archive data, at least v1.0 to extract
/usr/share/java/jgoodies-common.jar: Zip archive data, at least v1.0 to extract
/usr/share/java/forms.jar: symbolic link to jgoodies-forms.jar
/usr/share/java/mac_widgets.jar: symbolic link to mac_widgets-0.10.0+svn416.jar
/usr/share/java/junit.jar: symbolic link to junit-3.8.2.jar
/usr/share/sikuli/sikuli-ide.jar: Java archive data (JAR)
/usr/share/java/sikuli-script.jar: symbolic link to sikuli-script-1.0~x~rc3.tesseract3.jar
发现很多no such file
安装依赖
sudo apt install libantlr3-runtime-java libjna-java libcommons-cli-java libjson-simple-java
问题解决.