在Mac OS X上使用java命令运行DynamoDB Local [英] Run DynamoDB Local with the java command on Mac OS X

查看:512
本文介绍了在Mac OS X上使用java命令运行DynamoDB Local的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在MAC上运行DynamoDB本地。
亚马逊官方博客说我必须下载jar文件并运行以下命令:

I'm trying to run DynamoDB local on a MAC. The Amazon official blog says I have to download the jar file and run the following command:

$ java –Djava.library.path=. -jar DynamoDBLocal.jar

但我在MAC OS X终端上收到以下错误:

But I got the following error on MAC OS X terminal:


错误:无法找到或加载主类-Djava.library.path =。

Error: Could not find or load main class –Djava.library.path=.

哇?命令接缝不识别-D参数..为什么?

Wut? The command seams not to recognise the -D parameter.. why?

我也在使用Linux(Fedora),我从来没有遇到任何问题。

I'm also working on Linux (Fedora) and I never had any problem with it.

在MAC OS X上, java -version 给我 java版本1.8.0_11

On MAC OS X, java -version gives me java version "1.8.0_11"

可能是什么问题? (我对java命令的了解不多)

What could be the problem? (I don't know that much with java commands)

编辑1 :感谢@Swapnil,我们可以注意到亚马逊博客上存在拼写错误,他们使用了错误的短划线字符( -D 参数,rel =noreferrer> EN DASH unicode U + 2013)。请注意亚马逊文档(不是博客)没有拼写错误,也指最新二进制

Edit 1: Thanks to @Swapnil, we can notice that there is a typo error on the Amazon blog, they used a wrong dash character (EN DASH unicode U+2013) for the -D argument. Note that the Amazon documentation (not the blog) does not have the typo error and also refers to an up-to-date binary.

编辑2 :使用正确的短划线,参数由java解释,但我仍然有一个(不同的)运行时期间的错误消息:

Edit 2: With the correct dash, the argument is interpreted by java, but I still got a (different) error message during runtime:


SEVERE:[sqlite] SQLiteQueue [AKID_eu-west-1.db]:错误运行作业
queue com.almworks.sqlite4java.SQLiteException:[ - 91]无法加载
库:java.lang.UnsatisfiedLinkError:
java.library.path中没有sqlite4java-osx-x86_64

SEVERE: [sqlite] SQLiteQueue[AKID_eu-west-1.db]: error running job queue com.almworks.sqlite4java.SQLiteException: [-91] cannot load library: java.lang.UnsatisfiedLinkError: no sqlite4java-osx-x86_64 in java.library.path

我修理过它:

java -Djava.library.path=./DynamoDBLocal_lib/  -jar DynamoDBLocal.jar

现在已经完成了y working ...亚马逊文档存在一些问题..

It's now finally working... Amazon documentation have some problems..

推荐答案

以下内容似乎适用于我的Mac OS X -

The below seems to work for me on my Mac OS X -

java -Djava.library.path=. -jar your_jar 

嗯,你在 -D中使用的短划线字符似乎是一个完全不同的角色。这可能会导致问题。

Well, the dash character you've used in –D seems to be a different character altogether. That's probably causing the problem.

这篇关于在Mac OS X上使用java命令运行DynamoDB Local的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆