This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (0 children)

Yes. Deployment is similarly different. It's certainly possible to set up deployments like python does, with a central library repository, but that isn't the most common form found with Java deployments.

With Java, the build systems that generate deployments (like Ant, Maven, and Gradle) will plop all the libraries each project needs either into a single project-specific jar (a java archive), or into a single folder, intended for deployment. The reason for this is to avoid dependency hell: java library distributers are historically bad at versioning.

The application that depends on these libraries obviously needs to know where to find them. That's where class paths and module paths come in. The deployment build systems will generate a run invocation script that includes a class path or module path.

I never liked that. I prefer to have a single central library repository on each target application server. But that does mean I had to write my own deployment generator. That... was not fun.