I basically agree, but I don't think it's random or entirely a matter of personal preference.American newspaper style is to never capitalize "false titles," such as plumber, cook, undertaker, prostitute, salesman, dishwasher, judge .... or even president or king unless they appear in front of a name as part of the formal title.
Java, of course, is a proper noun and as such is capitalized.
As always with style issues, take your pick.