KOJAC is a set of Java classes implementing optical elements and optics laws in order to build and simulate optical systems.
There was a time, back in the mid-1990s, when a little language called Oak was being developed by Sun. I recall bumping into it ...