代码改变世界

简单配置jena在eclipse的开发环境

2017-04-13 10:53  撞破南墙  阅读(1865)  评论(0编辑  收藏  举报

 Jena:A free and open source Java framework for building Semantic Web and Linked Data applications.

耶拿(Jena)是德国中部萨莱河畔的市镇,人口约十万余,是德国图林根州仅次于州首府埃尔福特的第二大城市。耶拿以光学工业闻名,有卡尔·蔡司厂和肖特玻璃厂。耶拿大学也较有名。
:)
 
1.下载 jena例子和源码
源码(可不下) https://github.com/apache/jena
 
安装前置JDK 1.8 (非JRE)
MVN用于自动获取JENA依赖的lib。 通过他下载example中的lib
 
2.1 (这里写你自己的路径,CMD中运行)set PATH="F:\2_Code\mvn\apache-maven-3.5.0\bin";%PATH%
2.2 Make sure JAVA_HOME is set to the location of your JDK,如果不是,可以仿照2.1设置path ,:D
2.3 Run "mvn --version" to verify that it is correctly installed.
2.4 cd jena-example 运行命令 “package mvn package”
2.5 配置成eclipse格式 “mvn eclipse:eclipse
【re-generate Eclipse .project and .classpath files automatically from your pom.xml file.】
2.6 自动拷贝进eclipse相关文件夹 mvn dependency:copy-dependencies
【copy all the *.jar files in the target/dependency/ directory.】
 
3.在eclipse中导入该项目。直接run即可。
 
PS:在eclipse中配置mvn个人感觉并不是很好用。