Hi again Alan. Thanks for your patience.
> I think we need to be more specific about terminology. We need
> clarfication of the statement "when run with jython" and "when run in
> java". Although both java and jython produce JVM bytecode, java
> textual code cannot be run by a jython interpreter and jython textual
> code cannot be run by a java compiler.
You're right. I apologize for being vague.
The Java code in question is in a collection of JARs that form a
library and associated desktop applications.
When I said "run in Java" I mean launching the applications normally
(by double-clicking) so that the application is run by the system JDK.
By "run with jython" I mean running a jython script that
- adds the JARs to the classpath,
- imports various classes from the JARs,
- and manipulates them to implement similar features to those found
in the applications.
Both methods invoke the same functionality, but only the jython fails.
> So you must have two different ways of invoking the same
> functionality, ...
Yes, that is what I was trying to express. Sorry again for not being clear.
> So it should be quite straightforward to reduce this to a very simple
> code snippet that reproduces the problem
I just put together an Eclipse project with a Java class per your
description (exported to a JAR in bin/) and an accompanying jython
On my machine, in the Windows console, when I execute the JAR directly
both the URL and URI are printed and are identical. However when I
invoke the jython script the URL prints (and has Windows directory
separators) and the conversion to URI fails with a URISyntaxException.
See the following screenshot:
> There are no options I am aware of that control these kinds of issues.
> More usually, they are simply down to platform-specific issues.
I am told that other Windows/jython users of the same framework have
not encountered this problem, which makes me think it is not simply a
platform thing (the problematic code is pretty much unavoidable, so I
doubt they're merely using a different portion of the framework).
However I'm not sure of the details of their environments.