Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
256 views
Welcome To Ask or Share your Answers For Others

1 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...