One thing is the division into projects made by Ides like Eclipse and Netbeans and another thing is the division of Java into libraries.
A Java program dynamically loads classes and resources that are available on classpath
, which can be defined as a parameter and consists of a list of directories and Jar files. Jar is basically a zip with classes compiled inside. So, basically you can plug any dependency by placing classes or jars in some directory included in classpath
.
As for the organization for development, in general you can create projects of various types in Ides: libraries and programs desktop (jar), web (War), Enterprise with EJB (Ear). To define which projects depend on which, each IDE has its mechanisms, but note that this is only a logical configuration for the compilation, because as already described above, in practice, all classes see all.
Updating
As mentioned in the comments, there are tools build like Maven that allows you to configure the different projects, their dependencies, the artifacts generated, in short, the entire generation cycle.
It is a more generic and agnostic way of organizing projects. I strongly recommend it because it also facilitates integration into Continuous Integration tools, static code analysis, code generators, etc.
Yet this is not something intrinsic to Java, but a logical organization of projects.
what are
models
andutils
? I don’t know anything about c#– Math
MVC - M (Models) business classes, utils is only classes for assistance, security, generate xml or something you need, rs
– Rod
Tip: You can use MAVEN. Your project structure can be used in N Ides. It serves for Desktop and Web Project, very practical and simple to use.
– noNihongo