我为jReddit当前mantainer。
首先,我想你使用的是旧版本jReddit的。从外观上看,您使用的是第一个版本1.0.0
。当前版本是1.0.2
。尝试从here下载罐子。
其次,我的建议是包括相当通过手动导入罐子使用maven的依赖。
我已经为你创建了一个小的pom.xml如何创建一个简单的Maven项目:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.yourcompany.test</groupId>
<artifactId>jreddit-testing</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>jreddit-testing</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.github.jreddit</groupId>
<artifactId>jreddit</artifactId>
<version>1.0.2</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
尝试添加源代码src/main/java
完成后,从命令行mvn clean install
运行(请记住,您需要在本地安装maven,尽管AFAIK intellij带有嵌入式maven)。
欲了解更多有关行家,看看this guy
它看起来像罐子不包含这个类或添加它错误的模块。 为什么不创建maven项目并在pom.xml中添加所有这些依赖关系? – Vartlok 2015-04-06 09:43:39
我从来没有做过一个之前,你建议的任何教程? – stringRay2014 2015-04-06 09:46:33
Maven: http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html http://tutorials.jenkov.com/maven/maven-tutorial.html IDEA maven : https://www.jetbrains.com/idea/help/maven-projects-tool-window。html – Vartlok 2015-04-06 09:48:51