Message1105

Author nobody
Recipients
Date 2006-02-22.10:25:30
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Hello,

We ran into problem with the following issue.

We use Jython 2.1 final. In the Lib and Tools 
directories, I find some python scripts, which when 
used, jythionc compiles to Java. When this happens, the 
resulting code has hardcoded absolute paths inside. If 
I switch operating systems, e.g., from Win to Linux or 
just rename the jpython directory, but use the same 
files system content, these absolute paths start giving 
problems when I want to build my project. Jythonc does 
not regenerate and recompile these system classes, and 
the absolute paths inside it uses for, some reason, to 
find other class files. As a result, the jythinc 
compiler finds the first file, but then when it starts 
traversing dependencies, it cannot find the other files 
as it uses the hardcoded paths in the .class files.

Possible solutions:

- do not put absolute, but relative (to some install 
path) paths in the Java code;
- regenerate the system class files to avoid use stale 
absolute paths in outdated .class files for code in Lib 
and Tools
- do not use paths at all, but only use package 
information and current running options to deduce any 
paths
- I think the jython.jar should suffice to compile 
everything if you put all necessary .py files and .
class files there. Anyway, hardcoded absolute paths 
should go.

Cheers,
  Nikolay Diakov
  nikolay.diakov@fredhopper.com
History
Date User Action Args
2008-02-20 17:17:28adminlinkissue1436557 messages
2008-02-20 17:17:28admincreate