Setup Jython scripting in Eclipse

sairam sir,

sir I am trying to use jython script in eclipse but I am getting some setup errors I could not solve these errors
console:

Failed to install '': java.nio.charset.UnsupportedCharsetException: cp0.
Exception in thread "main" ImportError: Cannot import site module and its dependencies: No module named site
Determine if the following attributes are correct:

  * sys.path: ['E:\\Eclipse recent version 16 jan 2016\\eclipse\\plugins\\org.python.pydev_5.1.1.201606162013\\pysrc\\pydev_sitecustomize', 'C:\\Users\\sairamsystem\\workspace\\ThyroidProj', 'C:\\Users\\sairamsystem\\workspace\\ThyroidProj\\myThyroidPackage', 'E:\\New folder (5)\\Fiji.app\\jars\\ant.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\ant-junit.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\ant-launcher.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\ant-nodeps.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\args4j-2.0.25.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\asm-4.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\asm-analysis-4.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\asm-commons-4.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\asm-tree-4.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\asm-util-4.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\autocomplete-2.5.7.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\base64-2.3.8.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\batik-1.8.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\bcmail-jdk14-138.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\bcprov-jdk14-138.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\bigdataviewer-core-1.2.2.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\bsh-2.0b4.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\bytelist-1.0.11.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\clojure-1.6.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\commons-codec-1.8.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\commons-lang3-3.1.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\commons-logging-1.1.1.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\commons-math3-3.4.1.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\ejml-0.24.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\eventbus-1.4.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\fake-2.0.0-SNAPSHOT.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\ffmpeg-2.6.1-0.11.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\ffmpeg-2.6.1-0.11-android-arm.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\ffmpeg-2.6.1-0.11-android-x86.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\ffmpeg-2.6.1-0.11-linux-x86.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\ffmpeg-2.6.1-0.11-linux-x86_64.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\ffmpeg-2.6.1-0.11-macosx-x86_64.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\ffmpeg-2.6.1-0.11-windows-x86.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\ffmpeg-2.6.1-0.11-windows-x86_64.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\fiji-compat-2.0.2.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\fiji-lib-2.1.1.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\fiji-scripting-2.0.0-SNAPSHOT.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\gentyref-1.1.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\groovy-2.3.6.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\gson-2.2.4.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\guava-17.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\ij-1.50b.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\ij1-patcher-0.12.2.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\imagej-2.0.0-rc-39.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\imagej-common-0.18.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\imagej-deprecated-0.1.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\imagej-launcher-3.1.6.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\imagej-legacy-0.17.3.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\imagej-ops-0.20.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\imagej-plugins-commands-0.6.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\imagej-plugins-tools-0.3.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\imagej-plugins-uploader-ssh-0.2.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\imagej-plugins-uploader-webdav-0.2.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\imagej-scripting-0.1.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\imagej-ui-awt-0.3.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\imagej-ui-swing-0.15.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\imagej-updater-0.7.7.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\imagescience-3.0.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\imageware-2.0.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\imglib2-2.4.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\imglib2-algorithm-0.3.1.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\imglib2-algorithm-fft-0.1.2.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\imglib2-algorithm-gpl-0.1.5.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\imglib2-ij-2.0.0-beta-31.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\imglib2-realtransform-2.0.0-beta-29.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\imglib2-roi-0.3.2.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\imglib2-ui-2.0.0-beta-29.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\invokebinder-1.2.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\itext-2.1.5.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\itextpdf-5.1.1.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\jacl.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\jai-codec-1.1.3.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\jai-core-1.1.3.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\jama-1.0.3.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\javac-1.6.0.24-ubuntu-fiji2.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\javacpp-0.11.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\java-cup-0.11a.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\javassist-3.19.0-GA.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\jcodings-1.0.10.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\jcommon-1.0.23.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\jdatepicker-1.3.2.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\jdom2-2.0.5.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\jep-2.4.2.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\jffi-1.2.7.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\jffi-1.2.7-native.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\jfreechart-1.0.19.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\jgoodies-common-1.7.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\jgoodies-forms-1.7.2.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\jgrapht-0.8.3.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\jgraphx-1.10.4.1.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\jhdf5-14.12.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\jhotdraw-7.6.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\jitk-tps-1.2.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\jna-3.2.7.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\jnr-constants-0.8.5.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\jnr-enxio-0.4.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\jnr-ffi-1.0.7.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\jnr-netdb-1.1.2.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\jnr-posix-3.0.1.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\jnr-unixsocket-0.3.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\jnr-x86asm-1.0.2.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\joda-time-2.3.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\joni-2.1.1.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\jpedalSTD-2.80b11.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\jruby-core-1.7.12.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\jruby-stdlib-1.7.12.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\js.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\jsch-0.1.49.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\JWlz-1.4.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\jython-shaded-2.5.3.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\jzlib-1.1.2.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\kryo-2.24.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\languagesupport-2.5.7.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\legacy-imglib1-1.1.4-DEPRECATED.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\log4j-1.2.17.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\logback-classic-1.1.1.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\logback-core-1.1.1.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\mapdb-1.0.3.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\markdownj-0.3.0-1.0.2b4.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\metadata-extractor-2.6.2.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\miglayout-3.7.4-swing.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\mij-1.3.6-fiji2.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\mines-jtk-20100113.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\minimaven-2.1.3.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\minlog-1.2.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\mpicbg-1.0.2.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\mpicbg-trakem2-1.2.2.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\nailgun-server-0.9.1.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\native-lib-loader-2.1.1.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\netcdf-4.3.19.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\object-inspector-0.1.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\objenesis-2.1.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\opencsv-2.4.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\options-1.1.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\pal-optimization-2.0.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\pentaho-package-manager-1.0.8.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\perf4j-0.9.13.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\postgresql-8.2-507.jdbc3.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\rhino-1.7.6.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\rsyntaxtextarea-2.5.7.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\scifio-0.25.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\scifio-bf-compat-2.0.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\scifio-cli-0.3.2.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\scifio-hdf5-0.1.1.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\scifio-jai-imageio-1.1.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\scifio-lifesci-0.7.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\scifio-ome-xml-0.13.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\scifio-tools-0.14.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\scijava-common-2.46.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\scijava-config-2.0.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\scijava-expression-parser-2.1.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\scijava-plugins-commands-0.2.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\scijava-plugins-platforms-0.1.3.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\scijava-plugins-text-markdown-0.1.1.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\scijava-plugins-text-plain-0.1.1.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\scijava-ui-awt-0.1.3.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\scijava-ui-swing-0.7.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\scripting-beanshell-0.2.2.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\scripting-clojure-0.1.3.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\scripting-groovy-0.2.2.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\scripting-java-0.3.3.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\scripting-javascript-0.4.1.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\scripting-jruby-0.2.2.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\scripting-jython-0.2.2.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\slf4j-api-1.7.6.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\snakeyaml-1.13.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\spim_data-1.0.0-beta-7.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\swing-checkbox-tree-1.0.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\T2-NIT-1.1.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\T2-TreelineGraph-1.1.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\tools-1.4.2.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\trove4j-3.0.3.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\udunits-4.3.18.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\VectorString-1.0.2.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\VIB-lib-2.1.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\wavelets-2.0.0.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\weave_jy2java-2.0.0-SNAPSHOT.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\weka-dev-3.7.11.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\xercesImpl-2.8.1.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\xml-apis-1.3.03.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\xmpcore-5.1.2.jar', 'E:\\New folder (5)\\Fiji.app\\jars\\yecht-1.0.jar', 'C:\\jython2.7.0\\jython', 'C:\\jython2.7.0\\jython\\Lib', 'C:\\jython2.7.0\\jython\\Lib\\site-packages', 'C:\\Program Files\\Java\\jre1.8.0_92\\lib\\resources.jar', 'C:\\Program Files\\Java\\jre1.8.0_92\\lib\\rt.jar', 'C:\\Program Files\\Java\\jre1.8.0_92\\lib\\jsse.jar', 'C:\\Program Files\\Java\\jre1.8.0_92\\lib\\jce.jar', 'C:\\Program Files\\Java\\jre1.8.0_92\\lib\\charsets.jar', 'C:\\Program Files\\Java\\jre1.8.0_92\\lib\\jfr.jar', 'C:\\Program Files\\Java\\jre1.8.0_92\\lib\\ext\\access-bridge-64.jar', 'C:\\Program Files\\Java\\jre1.8.0_92\\lib\\ext\\cldrdata.jar', 'C:\\Program Files\\Java\\jre1.8.0_92\\lib\\ext\\dnsns.jar', 'C:\\Program Files\\Java\\jre1.8.0_92\\lib\\ext\\jaccess.jar', 'C:\\Program Files\\Java\\jre1.8.0_92\\lib\\ext\\jfxrt.jar', 'C:\\Program Files\\Java\\jre1.8.0_92\\lib\\ext\\localedata.jar', 'C:\\Program Files\\Java\\jre1.8.0_92\\lib\\ext\\nashorn.jar', 'C:\\Program Files\\Java\\jre1.8.0_92\\lib\\ext\\sunec.jar', 'C:\\Program Files\\Java\\jre1.8.0_92\\lib\\ext\\sunjce_provider.jar', 'C:\\Program Files\\Java\\jre1.8.0_92\\lib\\ext\\sunmscapi.jar', 'C:\\Program Files\\Java\\jre1.8.0_92\\lib\\ext\\sunpkcs11.jar', 'C:\\Program Files\\Java\\jre1.8.0_92\\lib\\ext\\zipfs.jar', 'C:\\jython2.7.0\\jython\\Lib', '__classpath__', '__pyclasspath__/']
This attribute might be including the wrong directories, such as from CPython

  * sys.prefix: C:\jython2.7.0\jython
This attribute is set by the system property python.home, although it can
be often automatically determined by the location of the Jython jar file

You can use the -S option or python.import.site=false to not import the site module

@lokesh_andhavarapu I moved your post to a new topic to avoid confusion between the discussion about the Wiki page and your issues with setting up Eclipse.

What exactly did you try so far? Did you follow instructions such as this one: http://www.jython.org/jythonbook/en/1.0/JythonIDE.html ?

Also: is there a specific reason you want to use Eclipse? Maybe the script editor in Fiji is sufficient for your task?

1 Like

no i am trying to develop gui for renal uptake

This is an answer to exactly which of my questions above?

  • You didn’t follow the setup instructions?
  • There’s no specific reason to use Eclipse?
  • The script editor is not sufficient for your task?

In case you meant the latter, I’m still not convinced. You can use Jython perfectly well from the script editor even to display UI elements.

I always thought renal function would work headless… :wink:

Seriously, if you want to get useful help, please be a bit more specific and concise when describing your issues. In particular, please list all steps that you took when trying to setup Jython in Eclipse.

1 Like

Do any bodily functions really work headless? :laughing:

:+1: @lokesh_andhavarapu You will need to invest more effort if you want to get useful advice. One nice article about this is How to ask good questions from StackOverflow.