什么是来源JAR? [英] What is a sources JAR?
问题描述
我最近试图导入一个库用于我正在处理的事情。
https://sites.google.com/site/piotrwendykier/software/jtransforms
我遇到了一些困难,因为我添加到构建路径的JAR是JTransforms-3.0-sources.jar而不是JTransforms-3.0.jar。
<现在我有点挠头,想知道第一个sources.jar是什么,如果它没有我想要使用的任何类。
它是什么?它是什么?
源jar是一个只包含源代码的jar( .java文件)对应于编译的工件。在IDE中将其添加为源附件,发布源等非常有用。
因为它只包含源,而不是编译类(.class文件) ,它作为库依赖没有用。
I was recently trying to import a library to use for something I am working on.
https://sites.google.com/site/piotrwendykier/software/jtransforms
I was having some difficulty because the JAR that I added to the build path was the "JTransforms-3.0-sources.jar" and not the "JTransforms-3.0.jar".
Now I am sort of scratching my head and just wondering what that first sources.jar was if it didn't have any of the classes that I wanted to use in it.
What is it and what is it for?
That sources jar is a jar that contains only the source code (the .java files) corresponding to the compiled artifact. It is useful to add it as a source attachment in your IDE, to publish the sources, etc.
As it only contains sources, not compiled classes (.class files), it is of no use as a library dependency.
这篇关于什么是来源JAR?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!