SLF4J:iText7到底需要哪些.jar文件? [英] SLF4J: Which .jar files does iText7 need exactly?

查看:177
本文介绍了SLF4J:iText7到底需要哪些.jar文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试运行此处,但它抱怨缺少SLF4J,所以我从官方网站下载了zip存档.

I tried to run the sample code shown here but it's complaining that SLF4J is missing, so I downloaded the zip archive from the official website.

教程视频显示使用了3个jar文件(log4j-over-slf4j,slf4j-api和slf4j-log4j12),但是如果我将所有3个文件都添加到我的项目(我没有使用Maven!),它抱怨"log4j-over ..."和api都在那儿.

The tutorial video shows that 3 of the jar files are used (log4j-over-slf4j, slf4j-api & slf4j-log4j12) but if I add all 3 of them to the build path of my project (I'm not using Maven!), it complains that both "log4j-over..." and the api are there.

如果我删除了"over"文件,它会显示无法实例化SLF4J LoggerFactory".

If I get rid of the "over" file, it says "Failed to instantiate SLF4J LoggerFactory".

那么,我到底需要哪些jar文件来阻止投诉并运行示例代码?

So, which jar files do I need exactly to stop the complaints and run the sample code?

推荐答案

有一个教程显示了示例代码所需的所有依赖关系.请尝试以下操作: https://developers. itextpdf.com/content/itext-7-jump-start-tutorial/installing-itext-7

There is a tutorial showing all the dependencies needed for the sample code. Try this please: https://developers.itextpdf.com/content/itext-7-jump-start-tutorial/installing-itext-7

基本上,它为您提供了项目需要运行的确切Maven依赖项列表.您还会发现一些指示,如日食 netbeans intelliJ

It basically gives you a list of the exact maven dependencies your project will need to run. You'll also find some indications how to make it work with the IDE like eclipse, netbeans and intelliJ

通过使用

<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-log4j12</artifactId>
    <version>1.7.18</version>
</dependency>

您可以手动下载这3个依赖项.随着log4j项目的进行,他们得到了任何slf4j:

you could manually download these 3 dependencies. They get any slf4j with log4j project going:

  • slf4j-api-1.6.1.jar
  • slf4j-log4j12-1.6.1.jar
  • log4j-1.2.16.jar

如果您不信任第三方网站,请访问 slf4j网站 log4j 主页.

if you don't trust 3rd party site go the slf4j site and the log4j homepage.

我们只需要slf4j api,它的log4j实现和log4j本身.

We simply need the slf4j api, its log4j implementation and log4j itself.

这篇关于SLF4J:iText7到底需要哪些.jar文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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