From: Curtis R. <ctr...@wi...> - 2016-12-29 15:36:00
|
Hi Chandler, > It looks like jython script want to import some modules from "Lib". > But it cannot locate the right path to the "Lib". The Lib files are only present in jython-standalone, not jython base: $ jar tf ~/.m2/repository/org/python/jython/2.7.0/jython-2.7.0.jar|grep ^Lib|wc -l 0 $ jar tf ~/.m2/repository/org/python/jython-standalone/2.7.0/ jython-standalone-2.7.0.jar|grep ^Lib|wc -l 1226 I'm not sure how JRuby relates to this issue though, except that Jython and JRuby are rather incompatible with one another on the same classpath, unless you take special measures [1]. Regards, Curtis [1] https://github.com/scijava/jython-shaded -- Curtis Rueden LOCI software architect - http://loci.wisc.edu/software ImageJ2 lead, Fiji maintainer - http://imagej.net/User:Rueden On Thu, Dec 29, 2016 at 1:13 AM, magicalne <mag...@gm...> wrote: > Hi all, > > I have been through this issue for almost 2 days. I think I have figured it > out. > > I use jsr223(groovy, jython) in my spring boot web project. I can execute > groovy script, but not jython script. > > It looks like jython script want to import some modules from "Lib". But it > cannot locate the right path to the "Lib". > > I think jython is a little guilty on this issue. > > The most simple way to get it work is to use : > *springBoot { requiresUnpack = ['org.jruby:jruby-complete'] }* > > You can find it in spring boot doc: > http://docs.spring.io/spring-boot/docs/current/reference/htm > l/howto-build.html#howto-extract-specific-libraries-when-an- > executable-jar-runs > <http://docs.spring.io/spring-boot/docs/current/reference/ht > ml/howto-build.html#howto-extract-specific-libraries-when- > an-executable-jar-runs> > > And it explains how it works. > > > > > -- > View this message in context: http://python.6.x6.nabble.com/ > Re-ImportError-No-module-named-re-tp5194446p5206030.html > Sent from the jython-users mailing list archive at Nabble.com. > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > |