Free software as defined by FSF. Are its standard libraries free/open source? Is its implementation free/open source? Which parts of it are not free/open source? Any other relevant information.
Java itself has been opened sourced, so in that respect it is free.
Some library implementations are open source, some are not. The ones from Sun have been opened sourced with the rest of the language.
As for the software you write - that's up to you.