Unfortunately the license is necessary. Without a license the code is covered by copyright by default, making any redistribution or usage of the code a copyright violation. Although a one-liner "do whatever the fuck you want" "license" is sufficient for redistribution or usage, it gives other people the opportunity to sue Oracle if the code somehow causes any kind of damage. Granted, it's just a Hello World, but in the US anybody can sue anyone for anything so I'm sure some jerk can come up with a stupid reason to sue someone over a Hello World. All this has made lawyers extremely careful.