Codename One is a way of creating native mobile applications for Android, iOS, BlackBerry and Windows Phone, using the same Java source code. Android native apps use Java, but iOS, BlackBerry and Windows Phone do not. Codename One makes translations of your Java code into the native code for each of these platforms, sometimes resulting in faster apps than the native versions. Codename One is open source for both commercial and non-commercial usage.
PhoneGap is a free and open source framework that allows you to create mobile apps using standardized web APIs for the platforms you care about.