[ Andreas Mayer ]
> I am looking for a solution to package the Python library files in
> Lib in a
> JAR archive, so that they can be imported from the archive as usual.
> I have already searched this mailing list and found an article that
> describes how to do this:
> I couldn't put this in action by myself. As described in the article,
> packaged the files with
> javac cvf lib.jar Lib
> and tried to import them with
> import sys
> import symbol
> and got an ImportError. I also tried other combinations (no '!Lib'
> suffix in
> the path, no subdirectory 'Lib' in the archive, ...) without prevail.
> Are the instructions in the article correct? How can you include the
> library files as *.py into a JAR archive? If this cannot be done, is
> possible to compile them into class files and import these from a JAR
> archive? The article's author states, that if precompiled, the
> library files
> will not load from a JAR archive.
please try with 'lib.jar/Lib' in sys.path (or -Dpython.path). It works
While debugging I verified that corresponding *$py.class files are read
from the .jar file, if present. BUT I did not verify that no compile