Jeff,

This may not apply to you just yet, but I recently have been working on Clamp, a package that supports this requirement. Clamp - and its name! - builds on earlier work by Darjus Loktevic and Charlie Groves.

Clamp can be found here, https://github.com/jythontools/clamp, with Clamp's usage documented in this demo project: https://github.com/jimbaker/clamped. Although currently you need to use GitHub to access, Clamp will be in PyPI once we have beta 2 of Jython 2.7 out. Jython 2.7b2 in turn requires supporting both pip and and its remaining (somewhat challenging) dependency, nonblocking SSL sockets.

In particular for your use case, Clamp adds a singlejar command to setup.py such that if your code has a __run__.py file, the jar is a single executable. Alternatively, such "uber jars" can be used by frameworks like Storm or Cassandra (specifically triggers). Clamp also covers a bunch of other use cases for Java integration, including being a compelling replacement for the Jython object factory pattern.

- Jim


On Fri, Dec 6, 2013 at 9:14 AM, Jeff Emanuel <jemanuel@frii.com> wrote:
Re-zip it using "jar".  You need to make sure to tell jar about the manifest file.




On 12/6/2013 8:46 AM, M.Rule wrote:
Hi all,

I'd like to package a Jython program as a self-contained Windows executable. This is a small project for a user-base that cannot be expected to install/configure Java or Jython, it needs to be really simple. So I guess that means that Jython and Java will be bundled with the application ( much like ImageJ ).

I've been pretty confused about how to "deploy" jython. Yesterday, I tried following this https://wiki.python.org/jython/JythonFaq/DistributingJythonScripts. I got to the point where the tutorial seemed to be asking that I unzip the stand-alone Jython jar, add my project files, re-zip it, and things should work. The only thing is, as soon as I unzip-rezip the stand-alone Jython jar, it breaks ( even if I do not modify its contents ), and Java no longer recognizes it as a valid Jar file.

So, that tutorial doesn't work for me.  It also doesn't get me all the way to a self-contained Windows executable. Does anyone have any leads?

Best, Michael.


------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk


_______________________________________________
Jython-users mailing list
Jython-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-users


------------------------------------------------------------------------------
Sponsored by Intel(R) XDK
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
Jython-users mailing list
Jython-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-users