Windows 7 在Windows 7上运行Kafka错误

Windows 7 在Windows 7上运行Kafka错误,windows-7,java-native-interface,apache-kafka,apache-zookeeper,Windows 7,Java Native Interface,Apache Kafka,Apache Zookeeper,下面是在Windows7上配置和运行ApacheKafka的教程。我已经设法在某个时候运行了它,一切都很顺利。在使用命令zkserver运行Kafka之前,我曾经运行zookeeper。然而,在某个时候,在我再次尝试重新运行它之后,我得到了以下错误: The syntax of the command is incorrect. Error: A JNI error has occurred, please check your installation and try again Except

下面是在Windows7上配置和运行ApacheKafka的教程。我已经设法在某个时候运行了它,一切都很顺利。在使用命令
zkserver
运行Kafka之前,我曾经运行zookeeper。然而,在某个时候,在我再次尝试重新运行它之后,我得到了以下错误:

The syntax of the command is incorrect.
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: scala/Function0
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
        at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
        at java.lang.Class.getMethod0(Class.java:3018)
        at java.lang.Class.getMethod(Class.java:1784)
        at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
        at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: scala.Function0
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
我正在使用此命令在命令提示符下运行Kafka:

Path\to\Kafka>.\bin\windows\kafka-server-start.bat .\config\server.properties
我使用的是这个版本的卡夫卡:卡夫卡2.12-0.10.2.0,还有这个版本的Zookeeper:Zookeeper-3.4.9


你知道这有什么问题吗?感谢您的帮助

您正在使用哪个版本的JDK来运行Kafka?Hi@Kedar。我使用的是jdk1.8.0 p卡夫卡本身与ZooKeeper版本捆绑在一起,该版本预先配置为用于卡夫卡。你能确认捆绑动物园管理员一切正常吗?嗨@Kedar。谢谢回复!在我重新启动计算机后,问题刚刚得到解决。现在,我可以使用命令
zkserver
运行Zookeeper,并使用命令
path\to\Kafka>bin\windows\Kafka-server-start.bat config/server.properties在windows上运行Kafka