KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I come from a .NET background and am completely new to Java and am trying to get my head around the Java project structure. My typical .NET solution structure contains projects that denote logically distinct components, usually named using the format: MyCompany.SomeApplication.ProjectName The project name usually equals the root namespace for the project. I might break the namespace down further if it's a large project, but more often than not I see no need to namespace any further. Now in Java, you have applications consisting of projects, and then you have a new logical level - the package. What is a package? What should it contain? How do you namespace within this App.Project.Package structure? Where do JARs fit into all this? Basically, can someone provide a newbies intro to Java application structure? Thanks! Edit: Some really cracking answers thanks guys. A couple of followup questions then: Do .JAR files contain compiled code? Or just compressed source code files? Is there a good reason why package names are all lower case? Can Packages have 'circular dependencies'? In other words, can Package.A use Package.B and vice versa? Can anyone just show the typical syntax for declaring a class as being in a package and declaring that you wish to reference another package in a class (a using statement maybe?)
Tags (comma-separated)
Save Edits
Cancel