<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Enigma Curry - Latest Comments in Distributing Jython Apps in a Single JAR file</title><link>http://enigmacurry.disqus.com/</link><description></description><atom:link href="https://enigmacurry.disqus.com/distributing_jython_apps_in_a_single_jar_file/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Sat, 11 Jun 2011 14:55:19 -0000</lastBuildDate><item><title>Re: Distributing Jython Apps in a Single JAR file</title><link>http://www.enigmacurry.com/2009/05/20/distributing-jython-apps-in-a-single-jar-file/#comment-223948506</link><description>&lt;p&gt;If only all "how to" articles worked so well!  Worked straight out of the box.  The most annoying thing was actually downloading a) ANT and b)  your GIT project itself: when I visited the ANT website I was told I'd have to "check out" with CVS... but eventually found an HTTP way of doing it.  When I installed your GIT app in order to "check out" your project, GIT messed with Windows Explorer, adding some annoying stuff to the File menu, which I had to edit the (XP) registry to get rid of.  There is an explanation of one-jar in The Definitive Guide To Jython, mentioning this site of yours, but their example didn't work for me: I got a totally mystifying "ClassFormatError: Truncated class file" when I tried to run the &amp;gt; java -jar XXX command.  Your readme is exemplary too: short, clear, what you want to know, and to the point.  You deserve a medal for services to Jython WBL (World's Best Language).&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mrodent33</dc:creator><pubDate>Sat, 11 Jun 2011 14:55:19 -0000</pubDate></item><item><title>Re: Distributing Jython Apps in a Single JAR file</title><link>http://www.enigmacurry.com/2009/05/20/distributing-jython-apps-in-a-single-jar-file/#comment-162799432</link><description>&lt;p&gt;Nice article! However, when i tried to use it for my app, I found that it was unable to find the Python libraries in the jar. On my development machine, they were found ok, but when I deployed to a machine which has neither Python nor Jython installed, it failed to load datetime. To make sure it wasn't some peculiarity of my app, I tweaked the provided sample app, adding 'import datetime' to the &lt;a href="http://__init__.py" rel="nofollow noopener" target="_blank" title="__init__.py"&gt;__init__.py&lt;/a&gt;. This gave the same failure. I suspect the issue is that Jython loads Python files using an explicit classloader, and therefore bypasses the one-jar classloader, but I haven't had time or inclination to verify this. I've since dropped one-jar and now my build.xml just gloms the library jars (including jython-full.jar) together. It now works when deployed on a clean linux machine with only java installed.&lt;/p&gt;&lt;p&gt;Cheers,&lt;/p&gt;&lt;p&gt;Michael&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Michael Lancaster</dc:creator><pubDate>Tue, 08 Mar 2011 22:31:43 -0000</pubDate></item><item><title>Re: Distributing Jython Apps in a Single JAR file</title><link>http://www.enigmacurry.com/2009/05/20/distributing-jython-apps-in-a-single-jar-file/#comment-96228855</link><description>&lt;p&gt;Hi there Enigma,&lt;br&gt;thank you for share your great tool. I'm trying to build up the jar file of my jython app. But I'm experiencing problem maybe related to class path. My app uses Swing, and when I run jar file, it fails showing this exception:&lt;/p&gt;&lt;p&gt;	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;br&gt;	at sun.reflect.NativeMethodAccessorImpl.invoke(&lt;a href="http://NativeMethodAccessorImpl.java" rel="nofollow noopener" target="_blank" title="NativeMethodAccessorImpl.java"&gt;NativeMethodAccessorImpl.java&lt;/a&gt;:39)&lt;br&gt;	at sun.reflect.DelegatingMethodAccessorImpl.invoke(&lt;a href="http://DelegatingMethodAccessorImpl.java" rel="nofollow noopener" target="_blank" title="DelegatingMethodAccessorImpl.java"&gt;DelegatingMethodAccessorImp...&lt;/a&gt;:25)&lt;br&gt;	at java.lang.reflect.Method.invoke(&lt;a href="http://Method.java" rel="nofollow noopener" target="_blank" title="Method.java"&gt;Method.java&lt;/a&gt;:597)&lt;br&gt;	at &lt;a href="http://com.simontuffs.onejar.Boot.run" rel="nofollow noopener" target="_blank" title="com.simontuffs.onejar.Boot.run"&gt;com.simontuffs.onejar.Boot.run&lt;/a&gt;(Unknown Source)&lt;br&gt;	at com.simontuffs.onejar.Boot.main(Unknown Source)&lt;br&gt;Caused by: Traceback (most recent call last):&lt;br&gt;  File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;br&gt;  File "__pyclasspath__/airq/&lt;a href="http://__init__.py" rel="nofollow noopener" target="_blank" title="__init__.py"&gt;__init__.py&lt;/a&gt;", line 3, in main&lt;br&gt;  File "__pyclasspath__/airq/&lt;a href="http://Application.py" rel="nofollow noopener" target="_blank" title="Application.py"&gt;Application.py&lt;/a&gt;", line 24, in &amp;lt;module&amp;gt;&lt;br&gt;ImportError: cannot import name swing&lt;/p&gt;&lt;p&gt;[cut]&lt;/p&gt;&lt;p&gt;Any tips?&lt;/p&gt;&lt;p&gt;Thanks in advance :-)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Carmine Noviello</dc:creator><pubDate>Thu, 11 Nov 2010 12:39:07 -0000</pubDate></item><item><title>Re: Distributing Jython Apps in a Single JAR file</title><link>http://www.enigmacurry.com/2009/05/20/distributing-jython-apps-in-a-single-jar-file/#comment-82328946</link><description>&lt;p&gt;Thanks for your suggestions - I now think I've got a bizarre MySQL error to sort out instead (SQLCode:0 SQLState: 08S01), no solution on t'Internet seems to work.&lt;/p&gt;&lt;p&gt;But at least that's nothing to do with your code!&lt;/p&gt;&lt;p&gt;Cheers&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Michael Wicks</dc:creator><pubDate>Thu, 30 Sep 2010 06:00:42 -0000</pubDate></item><item><title>Re: Distributing Jython Apps in a Single JAR file</title><link>http://www.enigmacurry.com/2009/05/20/distributing-jython-apps-in-a-single-jar-file/#comment-81947609</link><description>&lt;p&gt;Yup, done that, to no avail.  Bizarrely when I run the script directly using Jython it works, so like you I suspect a Classpath issue.&lt;/p&gt;&lt;p&gt;here's the command that works:&lt;br&gt;java -Djdbc.drivers=org.gjt.mm.mysql.Driver -Dpython.home=/...../jython2.5.1 -Dpython.path=/.... -cp /..../jython2.5.1/jython.jar:/..../jython2.5.1/mm.mysql-2.0.14-bin.jar:/..../jython2.5.1/mysql-connector-java-5.1.12-bin.jar:$CLASSPATH org.python.util.jython &lt;a href="http://regenerateDerivedData.py" rel="nofollow noopener" target="_blank" title="regenerateDerivedData.py"&gt;regenerateDerivedData.py&lt;/a&gt;&lt;/p&gt;&lt;p&gt;I think I need to configure your ANT setup to pick up some of these flags, perhaps?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Michael Wicks</dc:creator><pubDate>Wed, 29 Sep 2010 06:14:55 -0000</pubDate></item><item><title>Re: Distributing Jython Apps in a Single JAR file</title><link>http://www.enigmacurry.com/2009/05/20/distributing-jython-apps-in-a-single-jar-file/#comment-81592788</link><description>&lt;p&gt;I'm assuming you're putting your jar dependencies in the /lib directory? The jars you put there should be automatically added to your classpath. Maybe one of your jar's has another dependency that you also need to put in the /lib directory?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">EnigmaCurry</dc:creator><pubDate>Tue, 28 Sep 2010 12:26:18 -0000</pubDate></item><item><title>Re: Distributing Jython Apps in a Single JAR file</title><link>http://www.enigmacurry.com/2009/05/20/distributing-jython-apps-in-a-single-jar-file/#comment-81586029</link><description>&lt;p&gt;Hi there Enigma - handy tool here, but I have 1 question:  I can get my Python/Jython script to execute nicely using your tool, but my script uses the zxJDBC library to access a MySQL database - and this continually fails thus, "zxJDBC.DatabaseError: driver [org.gjt.mm.mysql.Driver] not found".&lt;/p&gt;&lt;p&gt;I'm, guessing I need to amend my Classpath to pick up some JDBC-related JARs - so how can I amend your facility to do this?&lt;/p&gt;&lt;p&gt;It would be really dandy to package up everything I need to run my Python scripts as a Jar .... !&lt;/p&gt;&lt;p&gt;many thanks &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Michael Wicks</dc:creator><pubDate>Tue, 28 Sep 2010 11:59:28 -0000</pubDate></item><item><title>Re: Distributing Jython Apps in a Single JAR file</title><link>http://www.enigmacurry.com/2009/05/20/distributing-jython-apps-in-a-single-jar-file/#comment-36371378</link><description>&lt;p&gt;Nope, looks like it's really down now.&lt;/p&gt;&lt;p&gt;I threw it up on github: &lt;a href="http://github.com/EnigmaCurry/Single-JAR-Jython-Example" rel="nofollow noopener" target="_blank" title="http://github.com/EnigmaCurry/Single-JAR-Jython-Example"&gt;http://github.com/EnigmaCur...&lt;/a&gt;&lt;/p&gt;&lt;p&gt;I'll edit the post to reflect this change&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">EnigmaCurry</dc:creator><pubDate>Wed, 24 Feb 2010 20:12:22 -0000</pubDate></item><item><title>Re: Distributing Jython Apps in a Single JAR file</title><link>http://www.enigmacurry.com/2009/05/20/distributing-jython-apps-in-a-single-jar-file/#comment-36298220</link><description>&lt;p&gt;Does it still work for you? I can not clone your repo, I get back "fatal: The remote end hung up unexpectedly".. Thank in advanced&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anthony</dc:creator><pubDate>Wed, 24 Feb 2010 11:23:48 -0000</pubDate></item><item><title>Re: Distributing Jython Apps in a Single JAR file</title><link>http://www.enigmacurry.com/2009/05/20/distributing-jython-apps-in-a-single-jar-file/#comment-17159326</link><description>&lt;p&gt; git clone &lt;a href="git://enigmacurry.com/single-jar-jython-example" rel="nofollow noopener" target="_blank" title="git://enigmacurry.com/single-jar-jython-example"&gt;git://enigmacurry.com/singl...&lt;/a&gt;&lt;/p&gt;&lt;p&gt;works for me. &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">EnigmaCurry</dc:creator><pubDate>Tue, 22 Sep 2009 22:57:40 -0000</pubDate></item><item><title>Re: Distributing Jython Apps in a Single JAR file</title><link>http://www.enigmacurry.com/2009/05/20/distributing-jython-apps-in-a-single-jar-file/#comment-17151714</link><description>&lt;p&gt;Is the git server address right? Curious, how you setup the onejar... Thanks&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Name</dc:creator><pubDate>Tue, 22 Sep 2009 19:36:26 -0000</pubDate></item></channel></rss>