I'd like to release an open source java library. I thought of using my last name as package name but I find that a bit weird. I'd like to use something more neutral like 'open.libname'.
Are there any recommendations on open source java package naming?
The usual recommendation is to prefix your package with the name of a domain you own in reverse order: com.mydomain.mypackage
. Since you own the domain, the chances of name collisions are reduced.
Also, a better choice for the package name is something that reflects the functionality of the package, rather than your own name. What will you use when you want to release your second (and perhaps totally unrelated) library?
As the others said, start the package name with the reversed domain name:
Register a domain such as myproject.org and then use org.myproject.mymodule
.
Or, if you don't have your own domain use the sub-domain where you host the code, e.g. if you host the code on myproject.sourceforge.net, use net.sourceforge.myproject.mymodule
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With