Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which package name should I use for open source java library? [closed]

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?

like image 474
Igor Gatis Avatar asked Mar 10 '11 19:03

Igor Gatis


2 Answers

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?

like image 28
Ted Hopp Avatar answered Nov 13 '22 17:11

Ted Hopp


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.

like image 65
Puce Avatar answered Nov 13 '22 15:11

Puce