嵌入Neo4j需要哪些罐子? [英] Which jars exactly are needed to embed Neo4j?

查看:148
本文介绍了嵌入Neo4j需要哪些罐子?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

编辑这个问题不是关于如何使用Ant / Maven / Gradle或诸如此类解决依赖关系。

EDIT This question is not about how to solve dependencies using Ant / Maven / Gradle or whatnots.

我正在尝试使用Neo4j和我对文档有点困惑,我需要嵌入一个非常简单的Hello,world!应用程序中的Neo4j示例。

I'm trying to use Neo4j and I'm a bit confused by the docs as to what I need to embed a very simple "Hello, world!" Neo4j example in an app.

我在几个地方看过Neo4j是轻量级的,只需要一个(现在是两个)罐子。

I've read in several places that Neo4j was lightweight and that only one (and now two) jars where needed.

例如: http://highscalability.com / neo4j-graph-database-kicks-buttox

我们可以读到:占地面积小.Neo4j是一个单一的< 500k jar,其中一个依赖(Java Transaction API)。

这正是我对Neo4j嵌入它感兴趣的原因之一......

This is precisely one of the reason I'm interested in Neo4j to embed it...

所以我下载了Neo4j的社区版(GPL)并阅读了这里的解释:

So I downloaded the community edition (GPL) of Neo4j and read the explanation here:

http://docs.neo4j.org/chunked/stable/tutorials-java-embedded-setup .html

其中说:提取Neo4j下载zip / tarball,并使用lib /目录中的jar文件。

现在这不仅简洁,而且我发现旧消息说措辞已经改变。有一点,Neo4j所需要的只是一个罐子(这是我有兴趣嵌入Neo4j btw的原因之一)。但现在显然是两个,因为它依赖于某些Java Transaction API(其中一个 .jar neo4j 附带?)

Now that's more than concise and I've found old messages saying that the "wording was changed". At one point all that Neo4j needed was one jar apparently (which is one of the reason I was interested in embedding Neo4j btw). But now apparently it's two, because there's a dependency on some Java Transaction API (which one? a .jar shipped with neo4j?)

问题是,如果我查看 lib / 目录,我有很多东西:

The problem is that if I look in that lib/ dir I've got quite some things:

1115454 lib/neo4j-kernel-1.6.1.jar
153707  lib/neo4j-graph-algo-1.6.1.jar
222791  lib/neo4j-shell-1.6.1.jar
8865464 lib/scala-library-2.9.0-1.jar
43530   lib/neo4j-jmx-1.6.1.jar
590503  lib/neo4j-kernel-1.6.1-tests.jar
23954   lib/neo4j-community-1.6.1.jar
28023   lib/neo4j-udc-1.6.1.jar
1517975 lib/neo4j-cypher-1.6.1.jar
51662   lib/neo4j-graph-matching-1.6.1.jar
16030   lib/geronimo-jta_1.1_spec-1.1.1.jar
143177  lib/neo4j-lucene-index-1.6.1.jar
1466301 lib/lucene-core-3.5.0.jar
118875  lib/server-api-1.6.1.jar
92850   lib/org.apache.servicemix.bundles.jline-0.9.94_1.jar

并且在 system / lib

27461   system/lib/blueprints-neo4j-graph-1.1.jar
72650   system/lib/jettison-1.3.jar
628626  system/lib/rrd4j-2.0.7.jar
17985   system/lib/asm-analysis-3.2.jar
177174  system/lib/jetty-util-6.1.25.jar
109043  system/lib/commons-io-1.4.jar
755981  system/lib/neo4j-server-1.6.1.jar
35910   system/lib/gremlin-java-1.4.jar
46367   system/lib/jsr311-api-1.1.1.jar
36551   system/lib/asm-util-3.2.jar
206035  system/lib/commons-beanutils-core-1.8.0.jar
227122  system/lib/jackson-core-asl-1.8.3.jar
33094   system/lib/asm-commons-3.2.jar
17308   system/lib/jcl-over-slf4j-1.6.1.jar
21878   system/lib/asm-tree-3.2.jar
12359   system/lib/log4j-over-slf4j-1.6.1.jar
.
.   (skipped a few jars from system/lib here)
.  

如果我的Emacs-fu足够强大, jars 几乎超过17 MB(不是嵌入式)......我甚至没有粘贴来自 system / lib / 的所有罐子。

If my Emacs-fu is strong enough the jars above weight at nearly 17 MB (not that "embeddable")... And I didn't even paste all the jars from system/lib/.

那么我需要的 .jar (以及它们是什么)的最小数量是多少,以便我可以嵌入Neo4j并运行一个简单的Hello,world!示例?

So what is the minimum number of .jar (and which are they) do I need so that I can embed Neo4j and run a simple "Hello, world!" example?

我对官方文档说:...使用lib /目录中的jar文件感到困惑。

I'm confused by the official doc saying: "... use the jar files found in the lib/ directory".

当然我不需要所有吗?

推荐答案

运行内核的绝对最小值是

The absolute minimum to run the kernel is

neo4j-kernel.jar
jta.jar

其余的是Cypher,Lucene索引和其他东西。

The rest is Cypher, Lucene indexing and other stuff.

这篇关于嵌入Neo4j需要哪些罐子?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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