Releasing a small library

Hello. I’m thinking of releasing a small library, but I have two questions:

  • What package should I put it in? I usually just use “.whatever”, but other libraries use more fancy package names. What is the “right” name?
  • I’ve been using Mediafire to “release” my stuff so far, but it’s not very good for a more permanent release as they remove files after a few days/months. I don’t have a server of my own…

put your code on googlecode : easy, fast, public and you can modify it anytime you want

Package name depends. The convention is to use the web name of whoever is behind it, and then the package name, and then whatever sub-packages. For example a ‘utils’ package by JavaGaming would be: org.javagaming.utils.

But just prefixing packages with ‘my_lib’ will be fine.

For releasing code you could try Java.net, but tbh I’d recommend something else. Google Code does the job, but it’s nothing special. These days everyone is flocking to Github, and although I’ve not used it, it’s what I would probably use if I released anything.

I would not want to use ‘my_lib’ for a public available lib, just make up a nice [org|net].. like

net.agentd.fancycode

Well, what does org and net stand for? Org(anization) and (inter)net? I’ll look into Google code and Github soon. Just finishing all the Javadoc writing.

If you don’t have a domain, just use the hosting site. I’ve seen a lot of packages just use com.github. (or com.googlecode. etc). Don’t put underscores in package names, it’s Just Not Done! :o

Okay, both Google Code and Github are waaaaaaaaay over my head. Or specifically, I don’t have any idea how to set up SVN or Git or anything… T___T It seems a little bit overkill, but it would be nice to learn to use some kind of version control software once and for all. I’ve only ever used an SVN client (for a game mod), so at least I know what they do and so.

Which software is “best” for a very simple project (under 15 class files)? I think I can get it working on my own if I fiddle with it a little…

Google code is the most simple as it offers not more then a simple svn. With subeclipse on Eclipse (if your using Eclipse that is) you can create a check out on the svn and move your code up to google servers. easy as that :smiley:

Ewww don’t use that abomination called SVN, use Mercurial :slight_smile: There is also a plugin for Mercurial in Eclipse.

I’m on Netbeans. It has support for all 3…

Ewwwww Netbeans don’t use that abomination :stuck_out_tongue:
Eclipse FTW!!!

I use NetBeans for Praxis, which is hosted on Google Code with Mercurial. Having not used Mercurial before (in fact I was using SVN on Google Code for a while) I found the setup to be pretty painless, and it’s nicely integrated into the IDE. Given that NetBeans itself is developed using Mercurial, I guess the devs have a lot of self-interest in making it a pleasure to use! :wink:

stop trolling! :stuck_out_tongue:

Use SVN for starters. It’s quite easy: http://code.google.com/apis/gadgets/docs/tools.html#Host

Take a look at Git and Mercurial later, since both are distributed versioning systems, which makes it a bit more complicated to understand whats going on.

Okay, I’ll go with that. I’m the most familiar with it anyway.

So Google Code is asking me for a license? Gah, so much bureaucracy! Which one means “Here’s the code, do what you want with it, give me cred if you feel like it”?

EDIT: I’ve tried to Google all the different licenses, and I think the “GNU Lesser GPL” is what I want. What do I have to do to “make” my program licensed? Add the license to each source file?

EDIT 2: Reading on http://www.gnu.org/licenses/gpl-howto.html, I believe I would put this at the top of every source file:

/*
    Copyright 2011 Name Here

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see < http://www.gnu.org/licenses/ >.
*/

I had to add spaces next to the <>, but otherwise, would this be the correct way of doing this?

EDIT 3: Okay, I’ve changed my mind as the BSD license seems better. Would this be fine?

/*
 * Copyright (c) 2011 Name Here
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
 * met:
 *
 * * Redistributions of source code must retain the above copyright
 *   notice, this list of conditions and the following disclaimer.
 *
 * * Redistributions in binary form must reproduce the above copyright
 *   notice, this list of conditions and the following disclaimer in the
 *   documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

Github supports SVN, and it looks pretty straight forward to me.

Subversion is no where near as bad as people claim, but Git and Mercurial are also no where near as complex as other claim. The real advantage I feel SVN has is that pretty much every IDE/editor that supports version control will support SVN out of the box.

The result: http://www.java-gaming.org/topics/small-java-threading-library/25143/view.html

I don’t know of an IDE that doesn’t have git support either. Mercurial is a bit of a mixed bag but it’s usually good enough. Subversion is a dead end, and you will find a dwindling number of tools that will support it going forward – for example you’ll get neither patch queues nor pull requests on the hosting site, and the branching support being added to task UI’s like Mylin won’t land for SVN either.

あああ、もううう! I just want to put a goddamn jar-file or two on the Internet! How hard can it be?! T___T