无意间看到MapDB,然后决定写个demo以便以后能使用上。
然而MapDB3使用了java8,这需要在eclipse添加上java8.
然而并部好用,报了一个类找不到的错误
Exception in thread "main" java.lang.NoClassDefFoundError: kotlin/jvm/internal/Intrinsics
经过google发现了一门新的语言KOTLIN。
然后eclipse上添加了KOTLIN的开发插件,把简单的demo在上面运行,结果有缺少各种依赖。
只好到github上看都需要什么依赖。
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-test</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.collections</groupId>
<artifactId>eclipse-collections-api</artifactId>
<version>7.0.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.collections</groupId>
<artifactId>eclipse-collections</artifactId>
<version>7.0.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.collections</groupId>
<artifactId>eclipse-collections-forkjoin</artifactId>
<version>7.0.0</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>19.0</version>
</dependency>
<dependency>
<groupId>net.jpountz.lz4</groupId>
<artifactId>lz4</artifactId>
<version>1.3.0</version>
</dependency>
<dependency>
<groupId>org.mapdb</groupId>
<artifactId>elsa</artifactId>
<version>3.0.0-M1</version>
</dependency>
Exception in thread "main" org.mapdb.DBException$GetVoid: Record does not exist, recid=1
有些无奈想放弃了。google也没找到答案。
最后决定在java项目里在跑一下,把kotlin-runtime-1.0.0.jar同其他依赖都放到java项目里面。运行OK了。