Q:

Java projects and git repositories

I'm working on two projects. One of them is a library that has some classes such as Neuron.java, ANN.java, etc. The other one is a visualization program that uses those classes and runs some simulations, and then displays the results.
I intended for these two projects to have a different name and be in separate git repositories. There is a problem, though. All of my project directories (in which I plan to keep the .git/ directory, the documentation, the classes and a .jar file of all the classes) reside in com/yannbane/.
If I declare my classes as belonging to the com.yannbane.library package (for example), how will someone that downloads the repo be able to use the library if he doesn't have the same folder structure?
Will it be easier for me to simply abandon com/yannbane and just keep all projects in completely separate directories and belonging to their own, separate packages? If I do so, I will have to share the .jar file of the library between the projects myself, right?

A:

All the package structure of your code should be inside the repository. 
You don't need to use Maven or an IDE (Netbeans, Eclipse) but you could use the same kind of structure to organize your code.
I would have something like:
Library/
        .git/
        src/
            com/
                yanbanne
        libs/
             dependencyL1.jar
             dependencyL2.jar
        dist/
             library.jar
             library.doc

Visualization/
              .git/
              src/
                  com/
                      yanbanne
              libs/
                   dependencyV1.jar
                   dependencyV2.jar
                   library.jar
              dist/
                   visualization.jar
                   visualization.doc

The lib folders could be omitted using tools like Maven or Ivy. Copying library.jar to the dependencies of Visualization could be done automatically by establishing a dependency among projects in an IDE, but this is the basic idea.

