Andi Vajda <va...@apache.org> wrote:

> We disagree here and since you want this, you can turn it on.

As long as I can turn it on, I'm happy.  But your other users will still
have this rather hard-to-understand hurdle to jump.  Maybe there could
be a better error message that explains it?  I wonder if Python has any
way to try to load a DLL?

Something like this:

try:
    from jcc import _jcc
except ImportError, x:
    if sys.platform == "win32":
        try:
            from ctypes import windll
        except:
            # probably an older Python
            raise x
        else:
            try:
                windll.LoadLibrary("jvm.dll")
            except WindowsError, x:
                if x.winerror == 126:
                    print """
The JVM DLL could not be loaded.  Make sure the location is on your Path
environment variable.
"""


> Nothing worse debugging building with one VM and running with another
> unwittingly.

Presumably the dynamic linker protects us from ABI mismatches... right?

But, of course, this is a common problem on Windows, so common that
there's a name for it, "DLL hell"... and so common that it might not
make sense to try to protect people from it here :-).

Bill

Reply via email to