Skip to main content

Fix Sun's runtime to use unix-file-locking for jars in the classpath.

No replies
Joined: 2003-06-13

When you start a java runtime on Unix (I encounter this problem daily on linux) loading classes from a jar which is in the global classpath does not lock the file as usual under unix (locking is very different on Windows; keep that in mind when replying).

The result is that if a jar that is used by someone is replaced, and some time later the running java instance will try to read a new class from that jar, the JVM crashes.

I suggest that the JVM does not reference the jar file by filename, but by inode which is the normal way this is done under unix and has been proven to work for years.