Neo4j发布Java窗体项目的jar包提示class not found错误
发布于 7 个月前 作者 twsyhqe 422 次浏览 来自 问答

用Eclipse -> Export导出带有JFrame窗体的jar包,在运行时总是提示 Class Not Found 错误: Exception in thread “Thread-0” java.lang.NoClassDefFoundError: org/neo4j/graphdb /factory/GraphDatabaseFactory at com.forms.GdbUtil.connect(GdbUtil.java:37) at com.forms.Program.run(Program.java:29) Caused by: java.lang.ClassNotFoundException: org.neo4j.graphdb.factory.GraphData baseFactory 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) … 2 more 在导出时的Manifest.mf文件内容中已标明依赖的jar包,即所有neo4j引入的.jar包如下:

  • Manifest-Version: 1.0
  • Main-Class: com.forms.Program
  • Class-Path: lib/bcpkix-jdk15on-1.53.jar
  • lib/bcprov-jdk15on-1.53.jar
  • lib/caffeine-2.3.3.jar
  • lib/commons-compress-1.12.jar
  • lib/commons-configuration-1.10.jar
  • lib/commons-io-2.4.jar
  • lib/commons-lang-2.6.jar
  • lib/commons-lang3-3.5.jar
  • lib/commons-logging-1.1.1.jar
  • lib/commons-text-1.1.jar
  • lib/concurrentlinkedhashmap-lru-1.4.2.jar
  • lib/jackson-core-asl-1.9.13.jar
  • lib/jackson-jaxrs-1.9.13.jar
  • lib/jackson-mapper-asl-1.9.13.jar
  • lib/javax.servlet-api-3.1.0.jar
  • lib/jersey-core-1.19.jar
  • lib/jersey-multipart-1.19.jar
  • lib/jersey-server-1.19.jar
  • lib/jersey-servlet-1.19.jar
  • lib/jetty-http-9.2.22.v20170606.jar
  • lib/jetty-io-9.2.22.v20170606.jar
  • lib/jetty-security-9.2.22.v20170606.jar
  • lib/jetty-server-9.2.22.v20170606.jar
  • lib/jetty-servlet-9.2.22.v20170606.jar
  • lib/jetty-util-9.2.22.v20170606.jar
  • lib/jetty-webapp-9.2.22.v20170606.jar
  • lib/jetty-xml-9.2.22.v20170606.jar
  • lib/jline-2.12.jar
  • lib/jsr311-api-1.1.2.r612.jar
  • lib/lucene-analyzers-common-5.5.0.jar
  • lib/lucene-codecs-5.5.0.jar
  • lib/lucene-core-5.5.0.jar
  • lib/lucene-queryparser-5.5.0.jar
  • lib/mimepull-1.9.3.jar
  • lib/neo4j-bolt-3.3.2.jar
  • lib/neo4j-browser-3.1.4.jar
  • lib/neo4j-codegen-3.3.2.jar
  • lib/neo4j-collections-3.3.2.jar
  • lib/neo4j-command-line-3.3.2.jar
  • lib/neo4j-common-3.3.2.jar
  • lib/neo4j-configuration-3.3.2.jar
  • lib/neo4j-consistency-check-3.3.2.jar
  • lib/neo4j-csv-3.3.2.jar
  • lib/neo4j-cypher-3.3.2.jar
  • lib/neo4j-cypher-compiler-2.3-2.3.11.jar
  • lib/neo4j-cypher-compiler-3.1-3.1.6.jar
  • lib/neo4j-cypher-compiler-3.2-3.2.8.jar
  • lib/neo4j-cypher-compiler-3.3-3.3.2.jar
  • lib/neo4j-cypher-frontend-2.3-2.3.11.jar
  • lib/neo4j-cypher-frontend-3.1-3.1.6.jar
  • lib/neo4j-cypher-frontend-3.2-3.2.8.jar
  • lib/neo4j-cypher-frontend-3.3-3.3.2.jar
  • lib/neo4j-cypher-ir-3.2-3.2.8.jar
  • lib/neo4j-cypher-ir-3.3-3.3.2.jar
  • lib/neo4j-cypher-logical-plans-3.3-3.3.2.jar
  • lib/neo4j-dbms-3.3.2.jar
  • lib/neo4j-graph-algo-3.3.2.jar
  • lib/neo4j-graphdb-api-3.3.2.jar
  • lib/neo4j-graph-matching-3.1.6.jar
  • lib/neo4j-import-tool-3.3.2.jar
  • lib/neo4j-index-3.3.2.jar
  • lib/neo4j-io-3.3.2.jar
  • lib/neo4j-jmx-3.3.2.jar
  • lib/neo4j-kernel-3.3.2.jar
  • lib/neo4j-logging-3.3.2.jar
  • lib/neo4j-lucene-index-3.3.2.jar
  • lib/neo4j-lucene-upgrade-3.3.2.jar
  • lib/neo4j-primitive-collections-3.3.2.jar
  • lib/neo4j-resource-3.3.2.jar
  • lib/neo4j-security-3.3.2.jar
  • lib/neo4j-server-3.3.2.jar
  • lib/neo4j-shell-3.3.2.jar
  • lib/neo4j-ssl-3.3.2.jar
  • lib/neo4j-udc-3.3.2.jar
  • lib/neo4j-unsafe-3.3.2.jar
  • lib/neo4j-values-3.3.2.jar
  • lib/netty-all-4.1.17.Final.jar
  • lib/opencsv-2.3.jar
  • lib/parboiled-core-1.1.7.jar
  • lib/parboiled-scala_2.11-1.1.7.jar
  • lib/rhino-1.7R4.jar
  • lib/scala-library-2.11.12.jar
  • lib/scala-reflect-2.11.12.jar
  • lib/server-api-3.3.2.jar

按照网上说的方法发布了,但是还是依旧报错,不知道如何解决。

1 回复

现在Java项目发布后,根本找不到neo4j的相关包

回到顶部