From: Robert W. B. <rb...@di...> - 2001-02-03 15:23:41
|
Hello all, This is a generic classpath question but I ran into it while looking at the recently discussed servlet dispatcher on Win98 (Tomcat 3.2.1, windows98 and jdk1.2.2). When Tomcat loads jar's from it's lib directory it loads them in ALL CAPS (i.e. %TOMCAT_HOME%\lib\SERVLET.JAR). When this happens, Jython cannot load classes contained in that jar. After looking closer I realized I could not load any classes from a jar file that is in the classpath with an all-caps ".JAR" extension. [dos windows] C:\>set CLASSPATH=c:\myapp\TEST.JAR C:\>jython Jython 2.0 on java1.2.2 (JIT: symcjit) Type "copyright", "credits" or "license" for more information. >>>from test import unitTest Traceback (innermost last): File "<console>", line 1, in ? ImportError: cannot import name unitTest However, java apps still successfully use 'import test.unitTest.*;' If I use "set CLASSPATH=c:\myapp\TEST.jar", all is fine. I'm not a Windows expert, but I had the impression that everything was supposed to support such name mangling. The questions: Is this really the current behavior or am I confused? is this expected behavior? Depending on the answers, I'll look at the classloader or pass along another jython servlet dispatcher with some name-munging and os.sep. Thanks, -Robert |