2

有什么问题??我按照本教程运行 amazon kinesis。 https://github.com/awslabs/amazon-kinesis-client-python

我一直到最后一步,这会给我命令行。这是我的命令行

c:\Program Files\Java\jdk1.7.0_79\bin\java.exe -cp C:\Python27\lib\site-packages\amazon_kclpy-1.2.0-py2.7.egg\amazon_kclpy\jars\amazon-kinesis-client-1.6.1.jar:C:\Python27\lib\site-packages\amazon_kclpy-1.2.0-py2.7.egg\amazon_kclpy\jars\aws-java-sdk-cloudwatch-1.10.20.jar:C:\Python27\lib\site-packages\amazon_kclpy-1.2.0-py2.7.egg\amazon_kclpy\jars\aws-java-sdk-core-1.10.20.jar:C:\Python27\lib\site-packages\amazon_kclpy-1.2.0-py2.7.egg\amazon_kclpy\jars\aws-java-sdk-dynamodb-1.10.20.jar:C:\Python27\lib\site-packages\amazon_kclpy-1.2.0-py2.7.egg\amazon_kclpy\jars\aws-java-sdk-kinesis-1.10.20.jar:C:\Python27\lib\site-packages\amazon_kclpy-1.2.0-py2.7.egg\amazon_kclpy\jars\aws-java-sdk-kms-1.10.20.jar:C:\Python27\lib\site-packages\amazon_kclpy-1.2.0-py2.7.egg\amazon_kclpy\jars\aws-java-sdk-s3-1.10.20.jar:C:\Python27\lib\site-packages\amazon_kclpy-1.2.0-py2.7.egg\amazon_kclpy\jars\commons-codec-1.6.jar:C:\Python27\lib\site-packages\amazon_kclpy-1.2.0-py2.7.egg\amazon_kclpy\jars\commons-lang-2.6.jar:C:\Python27\lib\site-packages\amazon_kclpy-1.2.0-py2.7.egg\amazon_kclpy\jars\commons-logging-1.1.3.jar:C:\Python27\lib\site-packages\amazon_kclpy-1.2.0-py2.7.egg\amazon_kclpy\jars\guava-18.0.jar:C:\Python27\lib\site-packages\amazon_kclpy-1.2.0-py2.7.egg\amazon_kclpy\jars\httpclient-4.3.6.jar:C:\Python27\lib\site-packages\amazon_kclpy-1.2.0-py2.7.egg\amazon_kclpy\jars\httpcore-4.3.3.jar:C:\Python27\lib\site-packages\amazon_kclpy-1.2.0-py2.7.egg\amazon_kclpy\jars\jackson-annotations-2.5.0.jar:C:\Python27\lib\site-packages\amazon_kclpy-1.2.0-py2.7.egg\amazon_kclpy\jars\jackson-core-2.5.3.jar:C:\Python27\lib\site-packages\amazon_kclpy-1.2.0-py2.7.egg\amazon_kclpy\jars\jackson-databind-2.5.3.jar:C:\Python27\lib\site-packages\amazon_kclpy-1.2.0-py2.7.egg\amazon_kclpy\jars\joda-time-2.8.1.jar:C:\Python27\lib\site-packages\amazon_kclpy-1.2.0-py2.7.egg\amazon_kclpy\jars\protobuf-java-2.6.1.jar:D:\python_Project\amazon_kclpy\samples com.amazonaws.services.kinesis.multilang.MultiLangDaemon sample.properties

我使用 python 2.7.11 作为代码和 windows 8.1。对于我用来生成命令行的命令: python samples\amazon_kclpy_helper.py --print_com mand --java "c:\Program Files\Java\jdk1.7.0_79\bin\java.exe" --properties sample s\样本.properties

我错过了什么?

4

2 回答 2

2

我也遇到了这个错误并解决了。

实际上,帮助脚本为 UNIX 系统生成命令。类路径中的 jar 用冒号分隔,对于 windows,它必须是分号。

所以,amazon_kclpy_helper.py换成return ':'.join(.... return ';'.join(...有两个地方需要更改。

也在sample.properties文件集中executableName = python your_kclpy_app.py

希望这对某人有所帮助。

于 2017-01-04T09:17:04.827 回答
0

我在亚马逊 EC2 上遇到了这个问题。它是通过将 java 从 1.7 升级到 1.8 来修复的。

Linux
sudo yum install java-1.8.0
sudo yum remove java-1.7.0-openjdk

Windows
下载并安装 JDK 1.8.0 (Java SE 1.8) http://www.oracle.com/technetwork/java/javase/downloads

希望能帮助到你

于 2016-09-20T21:35:01.237 回答