驱逐jar文件压缩

时间:2016-01-25 10:45:03

标签: java jar sikuli

如何运行Sikulix.class

这是我遇到的错误。

D:\test_sikuli\sikulix>java -cp D:\test_sikuli\sikulix\org\sikuli\ide SikuliIDE
Exception in thread "main" java.lang.NoClassDefFoundError: SikuliIDE (wrong name: org/sikuli/ide/SikuliIDE)
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$100(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)

1 个答案:

答案 0 :(得分:0)

您要运行的课程显然是org.sikuli.ide.SikuliIDE。您需要将类路径设置为顶级文件夹而不是包文件夹,并使用限定类名。

D:\test_sikuli\sikulix>java -cp D:\test_sikuli\sikulix org.sikuli.ide.SikuliIDE