Re: [Jython-users] How to build Jython standalone jar from source code

Jim Baker <[email protected]>
Newsgroups gmane.comp.lang.jython.devel,gmane.comp.lang.jython.user
Message-ID <CAOhO=aPakoZ9EfZuzkvn4_o_LwEVOs96+xqzzOVepPFcNGA4tw@mail.gmail.com>
Yaqiang,

I believe that bug was fixed related to sockets was most likely fixed, but
we have other issues where Java is using Unicode, but Python wants a str
(which is just bytes). So we see it in the somewhat related bugs
http://bugs.jython.org/issue2369 and http://bugs.jython.org/issue2293
(possibly others).

I think the only way we are going to solve this problem is for one of us
developers to attempt to do everything using a username/home directory that
does not use ascii. Otherwise we are just doing piecemeal fixes.

- Jim

On Fri, Jan 8, 2016 at 8:06 PM, [email protected] <
[email protected]> wrote:

> Dear jim,
>
> I have built Jython standalone jar for version 2.7.1b2 succesfully using
> 'ant all-jars' command with Java 7. But I still have below problem with
> newest Jython version.
>
> I am developing MeteoInfoLab software using Java and Jython (as script
> language). It's ok to initialize Jython when the directory path only
> includes ASCII characters. But the initialization will be failed if the
> path includes non-ASCII characters (in my case is Chinese characters).  The
> error message shows: java.lang.IllegalArgumentException: Cannot create PyString with non-byte value.
> The issue 2331 said it has been solved in 2.7.1b2 (
> http://bugs.jython.org/issue2331) , but the problem is still there from
> my test. I also mentioned that a comment report same problem in github (
> https://github.com/jythontools/jython/commit/c61eaefb774cdb174472265d3c27fc5b87febd34
> ).
>
> The detailed error message:
>
> java.lang.IllegalArgumentException: Cannot create PyString with non-byte value
> at org.python.core.PyString.<init>(PyString.java:64)
> at org.python.core.PyString.<init>(PyString.java:70)
> at org.python.core.Py.newString(Py.java:645)
> at org.python.core.PySystemState.initRegistry(PySystemState.java:795)
> at org.python.core.PySystemState.doInitialize(PySystemState.java:1040)
> at org.python.core.PySystemState.initialize(PySystemState.java:969)
> at org.python.core.PySystemState.initialize(PySystemState.java:925)
> at org.python.core.PySystemState.initialize(PySystemState.java:920)
> at org.python.core.PySystemState.initialize(PySystemState.java:915)
> at org.python.core.PySystemState.initialize(PySystemState.java:911)
>
> at org.python.core.ThreadStateMapping.getThreadState(ThreadStateMapping.java:32)
> at org.python.core.Py.getThreadState(Py.java:1457)
> at org.python.core.Py.getThreadState(Py.java:1453)
> at org.python.core.Py.getSystemState(Py.java:1473)
>
> at org.meteoinfo.laboratory.gui.ConsoleDockable.initializeConsole(ConsoleDockable.java:65)
>
> at org.meteoinfo.laboratory.gui.ConsoleDockable.<init>(ConsoleDockable.java:47)
> at org.meteoinfo.laboratory.gui.FrmMain.<init>(FrmMain.java:143)
> at org.meteoinfo.laboratory.MeteoInfoLab$1.run(MeteoInfoLab.java:264)
>
> Regards
> Yaqiang
> ------------------------------
> *************************************************
> Dr. Yaqiang Wang
> Chinese Academy of Meteorological Sciences (CAMS)
> 46, Zhong-Guan-Cun South Avenue
> Beijing, 100081
> China
>
> [email protected]
>
> http://www.meteothinker.com
> *https://www.researchgate.net/profile/Yaqiang_Wang5
> <https://www.researchgate.net/profile/Yaqiang_Wang5>*
> **************************************************
>
>
> *From:* Jim Baker <[email protected]>
> *Date:* 2016-01-09 10:10
> *To:* [email protected]
> *CC:* jython-users <[email protected]>
> *Subject:* Re: [Jython-users] How to build Jython standalone jar from
> source code
> Yaqiang,
>
> Check out the source from https://hg.python.org/jython or the mirror at
> https://github.com/jythontools/jython
>
> You can build from source by using this ant target:
>
> all all-jars
>
> The standalone jar is in dist/jython-standalone.jar
>
> Please note that due to the use of an older version of Antlr, building is
> only currently supported on Java 7; but built jars will run on Java 7, 8,
> or 9. (Taking into account this limitation with Java 9:
> http://bugs.jython.org/issue2362)
>
> Hope this helps!
>
> - Jim
>
> On Fri, Jan 8, 2016 at 7:02 PM, [email protected] <
> [email protected]> wrote:
>
>> How to build Jython standalone jar from source code? Any help is
>> appreciated.
>>
>> Regrads
>> Yaqiang
>> ------------------------------
>> *************************************************
>> Dr. Yaqiang Wang
>> Chinese Academy of Meteorological Sciences (CAMS)
>> 46, Zhong-Guan-Cun South Avenue
>> Beijing, 100081
>> China
>>
>> [email protected]
>>
>> http://www.meteothinker.com
>> *https://www.researchgate.net/profile/Yaqiang_Wang5
>> <https://www.researchgate.net/profile/Yaqiang_Wang5>*
>> **************************************************
>>
>>
>> ------------------------------------------------------------------------------
>> Site24x7 APM Insight: Get Deep Visibility into Application Performance
>> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
>> Monitor end-to-end web transactions and take corrective actions now
>> Troubleshoot faster and improve end-user experience. Signup Now!
>> http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
>> _______________________________________________
>> Jython-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/jython-users
>>
>>
>

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140

_______________________________________________
Jython-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jython-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.