compile java with GUI on unix system/putty

is it possible in the first place?

if so, how should I go about it?