Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How should I name a Java package? [duplicate]

Possible Duplicate:
What package naming convention do you use for personal/hobby projects in Java?

I am learning Java and have found a problem. I would need a domain name for my packages, but I don't have one. I wouldn't like to use my email address. So should I make an account on SourceForge or GitHub and use that? If so, which one is best? Or is there another, better method? Thanks

like image 810
Macro206 Avatar asked Oct 26 '25 07:10

Macro206


1 Answers

A common naming scheme used is the following (| means or):

country| org|com.name.applicationName.subpackages

Name is either a company or your name. And after the applicationName you start all your subpackages (that is what I mean in the end) e.g. util, ui,db etc

For example if you are John Dave from England use en.jdave.smartapp.ui.core.forms. Or Marcus German From Germany: de.mgerman.smartapp.ui.core.forms etc

like image 84
Cratylus Avatar answered Oct 28 '25 20:10

Cratylus



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!