什么是来源JAR? [英] What is a sources JAR?

查看:160
本文介绍了什么是来源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屋!

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