If JVM is available on Windows then can you run a program written in Unix?

Yes. One of the fundamental principles of Java is "write once, run anywhere." This means that Java source code can run on any platform for which a JVM exists, regardless of where the original code was developed.