The same class file in multiple .jar files. How bad is this?

Posted by Kannan Goundan on Stack Overflow See other posts from Stack Overflow or by Kannan Goundan
Published on 2010-04-24T09:12:09Z Indexed on 2010/04/24 9:13 UTC
Read the original article Hit count: 302

Filed under:

I have a library that writes data in either a text or binary format. It has the following three components:

  1. common data structures
  2. text writer (depends on 1)
  3. binary writer (depends on 1)

The obvious way to distribute this is as 3 .jar files, so that users can include only what they need.

However, the "common data structures" component is really just two small classes so I'm considering creating only two .jar files and including the common .class files in both.

My question: What are the potential problems with doing this?

© Stack Overflow or respective owner

Related posts about java

Related posts about jar