NOTICE! This is a static HTML version of a legacy Fiji BugZilla bug.

The Fiji project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Bug 776 - jruby integration is broken
jruby integration is broken
Status: RESOLVED FIXED
Product: Fiji
Classification: Unclassified
Component: Plugins
unspecified
PC Linux
: P4 major
Assigned To: Mark Hiner
Depends on:
Blocks:
 
Reported: 2014-06-12 06:01 CDT by brotkastennation
Modified: 2014-08-28 08:44 CDT
4 users (show)

See Also:

Description brotkastennation 2014-06-12 06:01:32 CDT
Since yesterday's update jruby isn't working anymore at all.
Reproduce:
Simply open a new Script window, select ruby as language
type and press run: print "test" #(nothing happens)
type and press run: ij
=> org.jruby.exceptions.RaiseException: (NameError) undefined local variable or method `ij' for main:Object
	at New_.(root)(New_.rb:1)

This was done on a freshly compiled and updated distribution.
(git clone ; ./Build.sh ; Fiji→Help­→Update...)

Happens also on command-line
./fiji --jruby <(echo ij)       
NameError: undefined local variable or method `ij' for main:Object
  (root) at /proc/self/fd/11:1


Information about your version of Java:

  os.arch => amd64
  os.name => Linux
  os.version => 3.14.6-1-ARCH
  java.version => 1.7.0_55
  java.vendor => Oracle Corporation
  java.runtime.name => OpenJDK Runtime Environment
  java.runtime.version => 1.7.0_55-b14
  java.vm.name => OpenJDK 64-Bit Server VM
  java.vm.version => 24.51-b03
  java.vm.vendor => Oracle Corporation
  java.vm.info => mixed mode
  java.awt.graphicsenv => sun.awt.X11GraphicsEnvironment
  java.specification.name => Java Platform API Specification
  java.specification.version => 1.7
  sun.cpu.endian => little
  sun.desktop => null
  file.separator => /

The up-to-date check says: REMIND_LATER

Information relevant to JAVA_HOME related problems:

  JAVA_HOME is set to: /usr/lib/jvm/java-7-openjdk/jre
  imagej.dir => /opt/fiji-custom/fiji

Information about the version of each plugin:

Activated update sites:
ImageJ: http://update.imagej.net/ (last check:20140611193802)

Files not up-to-date:
  7c30c48a (MODIFIED) 20140611122144 Contents/Info.plist
  6b82c620 (LOCAL_ONLY) 20140611122144 Contents/Resources/Fiji.icns
  e369d216 (MODIFIED) 20140611122144 README.md
  766b3f0c (LOCAL_ONLY) 20140611122144 images/fiji-logo-1.0-128x128.png
  5bec251f (LOCAL_ONLY) 20140611122144 images/fiji-logo-1.0-256x256.png
  78576254 (LOCAL_ONLY) 20140611122144 images/function.png
  1faaeed6 (MODIFIED) 20140611122144 images/icon-flat.png
  a02d5340 (MODIFIED) 20140611122144 images/icon.png
  499a3cd7 (LOCAL_ONLY) 20140611122144 images/var.png
  91ece67d (LOCAL_ONLY) 20140611122235 jars/JWlz-1.4.0.jar
  8168b41c (LOCAL_ONLY) 20140611122236 jars/VIB-lib-2.0.0-SNAPSHOT.jar
  2d4780f4 (LOCAL_ONLY) 20140611122236 jars/VectorString-1.0-SNAPSHOT.jar
  a70a2d61 (LOCAL_ONLY) 20140611122236 jars/args4j-2.0.25.jar
  5a0c7964 (LOCAL_ONLY) 20140611122236 jars/batik-1.8.jar
  79924510 (LOCAL_ONLY) 20140611122236 jars/bio-formats/formats-api-5.0.2.jar
  aa815682 (LOCAL_ONLY) 20140611122236 jars/bio-formats/formats-bsd-5.0.2.jar
  98d89e4c (LOCAL_ONLY) 20140611122236 jars/bio-formats/formats-common-5.0.2.jar
  b0dc6eac (LOCAL_ONLY) 20140611122236 jars/bio-formats/formats-gpl-5.0.2.jar
  0b99a39a (LOCAL_ONLY) 20140611122238 jars/bio-formats/mdbtools-java-5.0.2.jar
  caf9f3ae (LOCAL_ONLY) 20140611122238 jars/bio-formats/metakit-5.0.2.jar
  fc861d9e (LOCAL_ONLY) 20140611122238 jars/bio-formats/ome-poi-5.0.2.jar
  f9c55626 (LOCAL_ONLY) 20140611122238 jars/bio-formats/ome-xml-5.0.2.jar
  8eb3709e (LOCAL_ONLY) 20140611122236 jars/commons-logging-1.1.1.jar
  f9509b47 (LOCAL_ONLY) 20140611122236 jars/commons-math3-3.2.jar
  3537b250 (LOCAL_ONLY) 20140611122236 jars/fake-2.0.0-SNAPSHOT.jar
  5f4f0bcc (LOCAL_ONLY) 20140611122236 jars/fiji-compat-2.0.0-SNAPSHOT.jar
  3bce0a2d (LOCAL_ONLY) 20140611122236 jars/fiji-scripting-2.0.0-SNAPSHOT.jar
  0fb912b4 (LOCAL_ONLY) 20140611122236 jars/imagescience-2.4.2-SNAPSHOT.jar
  29a106c2 (LOCAL_ONLY) 20140611122236 jars/imageware-2.0.0-SNAPSHOT.jar
  ce6460d3 (LOCAL_ONLY) 20140611122236 jars/imglib2-algorithms-gpl-2.0.0-beta-26.jar
  673fae25 (LOCAL_ONLY) 20140611122236 jars/imglib2-algorithms-legacy-2.0.0-beta-26.jar
  480b3c14 (LOCAL_ONLY) 20140611122236 jars/itextpdf-5.1.1.jar
  a6c1d188 (LOCAL_ONLY) 20140611122236 jars/j3d-core-1.5.2.jar
  053035a0 (LOCAL_ONLY) 20140611122236 jars/j3d-core-utils-1.5.2.jar
  3d81473f (LOCAL_ONLY) 20140611122236 jars/jai-codec-1.1.3.jar
  5f7f32e2 (LOCAL_ONLY) 20140611122236 jars/jai-core-1.1.3.jar
  e4ac596e (LOCAL_ONLY) 20140611122236 jars/java-cup-0.11a.jar
  74e47f13 (LOCAL_ONLY) 20140611122219 jars/javac-1.6.0.24-ubuntu-fiji1.jar
  f3074e37 (LOCAL_ONLY) 20140611122237 jars/jdom2-2.0.5.jar
  88e007cd (LOCAL_ONLY) 20140611122237 jars/jep-2.4.2.jar
  b5efe893 (LOCAL_ONLY) 20140611122237 jars/jgoodies-common-1.7.0.jar
  5198aba1 (LOCAL_ONLY) 20140611122237 jars/jgoodies-forms-1.7.2.jar
  0e15c072 (LOCAL_ONLY) 20140611122237 jars/jgrapht-0.8.3.jar
  0b768690 (LOCAL_ONLY) 20140611122237 jars/jgraphx-1.10.4.1.jar
  90915f54 (LOCAL_ONLY) 20140611122237 jars/jna-3.2.7.jar
  1ad3be0d (LOCAL_ONLY) 20140611122237 jars/jpedalSTD-2.80b11.jar
  324422ad (LOCAL_ONLY) 20140611122237 jars/js-1.7R2.jar
  c335989b (LOCAL_ONLY) 20140611122237 jars/jzlib-1.0.7.jar
  6c859938 (LOCAL_ONLY) 20140611122237 jars/legacy-imglib1-2.0.0-SNAPSHOT.jar
  35c256ae (OBSOLETE_MODIFIED) 20140611122237 jars/log4j-1.2.17.jar
  7e731ab3 (LOCAL_ONLY) 20140611122237 jars/logback-classic-1.1.1.jar
  b1892343 (LOCAL_ONLY) 20140611122237 jars/logback-core-1.1.1.jar
  231d26b8 (LOCAL_ONLY) 20140611122239 jars/meta-fiji-external-plugins-2.0.0-SNAPSHOT.jar
  4a1974eb (LOCAL_ONLY) 20140611122238 jars/mij-1.3.6-fiji2-SNAPSHOT.jar
  d23fbd8f (LOCAL_ONLY) 20140611122238 jars/mpicbg-20111128.jar
  a51a31db (LOCAL_ONLY) 20140611122238 jars/netcdf-4.3.19.jar
  4660a416 (LOCAL_ONLY) 20140611122238 jars/pal-optimization-2.0.0-SNAPSHOT.jar
  82577709 (LOCAL_ONLY) 20140611122238 jars/pentaho-package-manager-1.0.0.jar
  29f840ae (LOCAL_ONLY) 20140611122238 jars/postgresql-8.2-507.jdbc3.jar
  0ed5f9bf (LOCAL_ONLY) 20140611122238 jars/scala-compiler-2.10.0.jar
  b3d3ad92 (LOCAL_ONLY) 20140611122238 jars/scala-library-2.10.0.jar
  fc039139 (LOCAL_ONLY) 20140611122238 jars/scala-reflect-2.10.0.jar
  e6380596 (LOCAL_ONLY) 20140611122238 jars/scifio-bf-compat-1.7.3.jar
  c544d657 (LOCAL_ONLY) 20140611122238 jars/scifio-lifesci-0.5.0.jar
  e5e6a28d (LOCAL_ONLY) 20140611122238 jars/scifio-ome-xml-0.9.0.jar
  543da7dc (LOCAL_ONLY) 20140611122238 jars/scifio-tools-0.15.0.jar
  5085d943 (OBSOLETE_MODIFIED) 20140611122239 jars/slf4j-api-1.7.6.jar
  9ae3dd1b (OBSOLETE_MODIFIED) 20140611122239 jars/slf4j-log4j12-1.7.2.jar
  6f32205f (LOCAL_ONLY) 20140611122239 jars/vecmath-1.5.2.jar
  d8a4cad8 (LOCAL_ONLY) 20140611122239 jars/wavelets-2.0.0-SNAPSHOT.jar
  b94bc93f (LOCAL_ONLY) 20140611122239 jars/weave_jy2java-2.0.0-SNAPSHOT.jar
  9a71e194 (LOCAL_ONLY) 20140611122239 jars/weka-dev-3.7.6.jar
  c432f64b (LOCAL_ONLY) 20140611122144 luts/16_colors.lut
  89419f99 (LOCAL_ONLY) 20140611122144 luts/5_ramps.lut
  dc3a1bdd (LOCAL_ONLY) 20140611122144 luts/6_shades.lut
  0b3bbb6c (LOCAL_ONLY) 20140611122144 luts/Cyan Hot.lut
  655b55e6 (LOCAL_ONLY) 20140611122144 luts/Green Fire Blue.lut
  2918f6d3 (LOCAL_ONLY) 20140611122144 luts/HiLo.lut
  a3312d3f (LOCAL_ONLY) 20140611122144 luts/ICA.lut
  db5bf8a4 (LOCAL_ONLY) 20140611122144 luts/ICA2.lut
  9f7dd167 (LOCAL_ONLY) 20140611122144 luts/ICA3.lut
  697dd3a4 (LOCAL_ONLY) 20140611122144 luts/Magenta Hot.lut
  524604de (LOCAL_ONLY) 20140611122144 luts/Orange Hot.lut
  9c9a56c2 (LOCAL_ONLY) 20140611122144 luts/Rainbow RGB.lut
  4e686ec6 (LOCAL_ONLY) 20140611122144 luts/Red Hot.lut
  2fdb7c96 (LOCAL_ONLY) 20140611122144 luts/Thermal.lut
  32157491 (LOCAL_ONLY) 20140611122144 luts/Yellow Hot.lut
  a4cec22b (LOCAL_ONLY) 20140611122144 luts/blue_orange_icb.lut
  c9e396a3 (LOCAL_ONLY) 20140611122144 luts/brgbcmyw.lut
  60f85e63 (LOCAL_ONLY) 20140611122144 luts/cool.lut
  ba88e5f3 (LOCAL_ONLY) 20140611122144 luts/edges.lut
  0a4dce83 (LOCAL_ONLY) 20140611122144 luts/gem.lut
  c616e765 (LOCAL_ONLY) 20140611122144 luts/glasbey.lut
  325c01f3 (LOCAL_ONLY) 20140611122144 luts/glow.lut
  1f99f07e (LOCAL_ONLY) 20140611122144 luts/phase.lut
  52a3c399 (LOCAL_ONLY) 20140611122144 luts/physics.lut
  49f5e48a (LOCAL_ONLY) 20140611122144 luts/royal.lut
  898954dd (LOCAL_ONLY) 20140611122144 luts/sepia.lut
  ebd4ed6b (LOCAL_ONLY) 20140611122144 luts/smart.lut
  36e7ca9e (LOCAL_ONLY) 20140611122144 luts/thal.lut
  940b38f9 (LOCAL_ONLY) 20140611122144 luts/thallium.lut
  17243681 (LOCAL_ONLY) 20140611122144 luts/unionjack.lut
  a15ba1d0 (LOCAL_ONLY) 20140611122144 macros/ImportResultsTable.txt
  25abcd0c (LOCAL_ONLY) 20140611122144 macros/StartupMacros.fiji.ijm
  a97e1da9 (LOCAL_ONLY) 20140611122144 macros/listManagement.txt
  1785bbbf (LOCAL_ONLY) 20140611122144 macros/toolsets/Clear Custom Tools.txt
  54200f47 (LOCAL_ONLY) 20140611122144 macros/toolsets/Drawing Tools.txt
  9bd39ac4 (LOCAL_ONLY) 20140611122144 macros/toolsets/Lookup Tables.txt
  f1c9843f (LOCAL_ONLY) 20140611122235 plugins/3D_Blob_Segmentation-2.0.0-SNAPSHOT.jar
  4728cb88 (LOCAL_ONLY) 20140611122235 plugins/3D_Objects_Counter-2.0.0-SNAPSHOT.jar
  00fc4b11 (LOCAL_ONLY) 20140611122235 plugins/3D_Viewer-2.0.0-SNAPSHOT.jar
  9274f337 (LOCAL_ONLY) 20140611122144 plugins/Analyze/Dynamic_ROI_Profiler.clj
  7acae667 (LOCAL_ONLY) 20140611122144 plugins/Analyze/Measure_RGB.txt
  f43ca307 (LOCAL_ONLY) 20140611122235 plugins/AnalyzeSkeleton_-2.0.0-SNAPSHOT.jar
  886fda7c (LOCAL_ONLY) 20140611122235 plugins/Analyze_Reader_Writer-2.0.0-SNAPSHOT.jar
  39e505d0 (LOCAL_ONLY) 20140611122235 plugins/Anisotropic_Diffusion_2D-2.0.0-SNAPSHOT.jar
  435feb1d (LOCAL_ONLY) 20140611122235 plugins/Archipelago_Plugins-0.5.0-SNAPSHOT.jar
  5a2c7cca (LOCAL_ONLY) 20140611122235 plugins/Arrow_-2.0.0-SNAPSHOT.jar
  e54e959e (LOCAL_ONLY) 20140611122235 plugins/Auto_Threshold-1.16-SNAPSHOT.jar
  f692b7f2 (LOCAL_ONLY) 20140611122235 plugins/BalloonSegmentation_-2.0.0-SNAPSHOT.jar
  857ca103 (LOCAL_ONLY) 20140611122235 plugins/BeanShell_Interpreter-2.0.0-SNAPSHOT.jar
  bfe3811a (LOCAL_ONLY) 20140611122235 plugins/Bug_Submitter-2.0.0-SNAPSHOT.jar
  601ae229 (LOCAL_ONLY) 20140611122235 plugins/CLI_-2.0.0-SNAPSHOT.jar
  dd366a81 (LOCAL_ONLY) 20140611122235 plugins/CPU_Meter-2.0.0-SNAPSHOT.jar
  924f3739 (LOCAL_ONLY) 20140611122235 plugins/Calculator_Plus-2.0.0-SNAPSHOT.jar
  24c0ac12 (LOCAL_ONLY) 20140611122235 plugins/Clojure_Interpreter-2.0.0-SNAPSHOT.jar
  433b5484 (LOCAL_ONLY) 20140611122235 plugins/Colocalisation_Analysis-2.0.0-SNAPSHOT.jar
  b877eaaa (LOCAL_ONLY) 20140611122235 plugins/Color_Histogram-2.0.6-SNAPSHOT.jar
  4f108f07 (LOCAL_ONLY) 20140611122235 plugins/Color_Inspector_3D-2.4-SNAPSHOT.jar
  2a1debd5 (LOCAL_ONLY) 20140611122235 plugins/Colour_Deconvolution-2.0.0-SNAPSHOT.jar
  87b80665 (LOCAL_ONLY) 20140611122235 plugins/CorrectBleach_-2.0.0-SNAPSHOT.jar
  5650c474 (LOCAL_ONLY) 20140611122235 plugins/Descriptor_based_registration-2.0.0-SNAPSHOT.jar
  49567c7d (LOCAL_ONLY) 20140611122235 plugins/Dichromacy_-2.0.0-SNAPSHOT.jar
  d8adb1ef (LOCAL_ONLY) 20140611122235 plugins/Differentials_-2.0.0-SNAPSHOT.jar
  1ea3d564 (LOCAL_ONLY) 20140611122235 plugins/Directionality_-2.0.1-SNAPSHOT.jar
  83caa3df (LOCAL_ONLY) 20140611122144 plugins/Examples/Add_Popup_Split_Channels.bsh
  f6fcfac7 (LOCAL_ONLY) 20140611122144 plugins/Examples/Anaglyph_for_Red_Cyan_glasses.rb
  5dcd79ab (LOCAL_ONLY) 20140611122144 plugins/Examples/Blobs_Demo_in_Ruby.rb
  73eff736 (LOCAL_ONLY) 20140611122144 plugins/Examples/Command_Launchers/Command_Launcher_BeanShell.bsh
  95549b2f (LOCAL_ONLY) 20140611122144 plugins/Examples/Command_Launchers/Command_Launcher_Clojure.clj
  dceba709 (LOCAL_ONLY) 20140611122144 plugins/Examples/Command_Launchers/Command_Launcher_Javascript.js
  e4954eac (LOCAL_ONLY) 20140611122144 plugins/Examples/Command_Launchers/Command_Launcher_Python.py
  f5111212 (LOCAL_ONLY) 20140611122144 plugins/Examples/Command_Launchers/Command_Launcher_Ruby.rb
  6076ad74 (LOCAL_ONLY) 20140611122144 plugins/Examples/CoverMaker/Cover_Maker.py
  eabbed47 (LOCAL_ONLY) 20140611122144 plugins/Examples/CoverMaker/Prepare_Cover_Maker_Database.py
  77c7bef5 (LOCAL_ONLY) 20140611122144 plugins/Examples/Delayed_Snapshot.py
  5536e038 (LOCAL_ONLY) 20140611122144 plugins/Examples/Delayed_Snapshot_Window.bsh
  4164c08c (LOCAL_ONLY) 20140611122144 plugins/Examples/Edit_LUT_As_Text.py
  780e948e (LOCAL_ONLY) 20140611122144 plugins/Examples/Extended_Profile_Plot.bsh
  b8881af2 (LOCAL_ONLY) 20140611122144 plugins/Examples/Fiji_Cube.ijm
  3687a018 (LOCAL_ONLY) 20140611122144 plugins/Examples/Fiji_Logo_3D.js
  998cb717 (LOCAL_ONLY) 20140611122144 plugins/Examples/Find_Dimension_of_Raw_Image.py
  66cf50fd (LOCAL_ONLY) 20140611122144 plugins/Examples/Image_To_Tool_Icon.bsh
  ccccc81e (LOCAL_ONLY) 20140611122144 plugins/Examples/Multithreaded_Image_Processing.clj
  720c237b (LOCAL_ONLY) 20140611122144 plugins/Examples/Multithreaded_Image_Processing_in_Javascript.js
  92ce736d (LOCAL_ONLY) 20140611122144 plugins/Examples/Plasma_Cloud.rb
  9efb2292 (LOCAL_ONLY) 20140611122144 plugins/Examples/Same_Slice_in_Multiple_Images.rb
  206a0bbd (LOCAL_ONLY) 20140611122144 plugins/Examples/The_Hue_Game.bsh
  1b6eee3a (LOCAL_ONLY) 20140611122144 plugins/Examples/TrakEM2_Example_Scripts/Homogenize_Ball_Radius.py
  940f6500 (LOCAL_ONLY) 20140611122144 plugins/Examples/TrakEM2_Example_Scripts/Measure_AreaLists.py
  3f4bba61 (LOCAL_ONLY) 20140611122144 plugins/Examples/TrakEM2_Example_Scripts/T2_Select_All.py
  72f00949 (LOCAL_ONLY) 20140611122144 plugins/Examples/TrakEM2_Example_Scripts/T2_set_all_transforms_to_identity.py
  89ef0307 (LOCAL_ONLY) 20140611122144 plugins/Examples/TrakEM2_Example_Scripts/extract_stack_under_arealist.py
  f8479f84 (LOCAL_ONLY) 20140611122144 plugins/Examples/blend_two_images.clj
  0989cf74 (LOCAL_ONLY) 20140611122144 plugins/Examples/celsius_to_fahrenheit.clj
  ff3b9902 (LOCAL_ONLY) 20140611122144 plugins/Examples/chess_.py
  69838e21 (LOCAL_ONLY) 20140611122144 plugins/Examples/compose_rgb-stacks.bsh
  4193ae7c (LOCAL_ONLY) 20140611122144 plugins/Examples/downsample_.js
  66a204d6 (LOCAL_ONLY) 20140611122144 plugins/Examples/list_all_threads.py
  ff4099b9 (LOCAL_ONLY) 20140611122144 plugins/Examples/random_noise_example.clj
  528c239e (LOCAL_ONLY) 20140611122235 plugins/Extended_Depth_Field-2.0.0-SNAPSHOT.jar
  923dbe9c (LOCAL_ONLY) 20140611122235 plugins/FS_Align_TrakEM2-2.0.0-SNAPSHOT.jar
  d1b17a3d (LOCAL_ONLY) 20140611122235 plugins/FeatureJ_-1.6.1-SNAPSHOT.jar
  cdb8ed1c (LOCAL_ONLY) 20140611122235 plugins/Feature_Detection-2.0.0-SNAPSHOT.jar
  e0ff5456 (LOCAL_ONLY) 20140611122235 plugins/Fiji_Archipelago-2.0.0-SNAPSHOT.jar
  c02a1e2c (LOCAL_ONLY) 20140611122235 plugins/Fiji_Developer-2.0.0-SNAPSHOT.jar
  815a1db4 (LOCAL_ONLY) 20140611122235 plugins/Fiji_Package_Maker-2.0.0-SNAPSHOT.jar
  e19c9416 (LOCAL_ONLY) 20140611122235 plugins/Fiji_Plugins-2.0.0-SNAPSHOT.jar
  eb9d4fb7 (LOCAL_ONLY) 20140611122235 plugins/Fiji_Updater.jar
  0bd032ee (LOCAL_ONLY) 20140611122235 plugins/FlowJ_-1.29.1-SNAPSHOT.jar
  ab8007d7 (LOCAL_ONLY) 20140611122235 plugins/Graph_Cut-0.2.0.jar
  ce54aeea (LOCAL_ONLY) 20140611122235 plugins/Gray_Morphology-2.3.2-SNAPSHOT.jar
  1b6d6b3b (LOCAL_ONLY) 20140611122235 plugins/Helmholtz_Analysis-2.0.1-SNAPSHOT.jar
  216f3328 (LOCAL_ONLY) 20140611122235 plugins/IJ_Robot-1.0.0.jar
  8bedac5a (LOCAL_ONLY) 20140611122235 plugins/IO_-2.0.0-SNAPSHOT.jar
  e6b88239 (LOCAL_ONLY) 20140611122235 plugins/Image_5D-1.2.5.jar
  27912ed1 (LOCAL_ONLY) 20140611122235 plugins/Image_Expression_Parser-2.0.0-SNAPSHOT.jar
  520cefcb (LOCAL_ONLY) 20140611122235 plugins/Interactive_3D_Surface_Plot-2.31.1-SNAPSHOT.jar
  845f8555 (LOCAL_ONLY) 20140611122235 plugins/IsoData_Classifier-2.0.0-SNAPSHOT.jar
  28582f55 (LOCAL_ONLY) 20140611122144 plugins/JRuby/imagej.rb
  9d482c55 (LOCAL_ONLY) 20140611122235 plugins/JRuby_Interpreter-2.0.0-SNAPSHOT.jar
  86347e9a (LOCAL_ONLY) 20140611122235 plugins/Javascript_-2.0.0-SNAPSHOT.jar
  96dd5801 (LOCAL_ONLY) 20140611122235 plugins/Jython_Interpreter-2.0.0-SNAPSHOT.jar
  f6d2d6e9 (LOCAL_ONLY) 20140611122235 plugins/Kuwahara_Filter-2.0.0-SNAPSHOT.jar
  3c7037ca (LOCAL_ONLY) 20140611122235 plugins/Lasso_and_Blow_Tool-2.0.0-SNAPSHOT.jar
  6f5873d2 (LOCAL_ONLY) 20140611122235 plugins/Linear_Kuwahara-2.0.0-SNAPSHOT.jar
  686876ba (LOCAL_ONLY) 20140611122235 plugins/LocalThickness_-3.1.1-SNAPSHOT.jar
  0dd8f9ee (LOCAL_ONLY) 20140611122235 plugins/MTrack2_-2.0.0-SNAPSHOT.jar
  dd55d7ff (LOCAL_ONLY) 20140611122235 plugins/MTrackJ_-1.5.1-SNAPSHOT.jar
  4dc10833 (LOCAL_ONLY) 20140611122235 plugins/M_I_P-2.0.0-SNAPSHOT.jar
  65a2dd78 (LOCAL_ONLY) 20140611122144 plugins/Macros/About_Plugin_Macros.txt
  dff5642d (LOCAL_ONLY) 20140611122144 plugins/Macros/Bulls_Eye.txt
  e7ffe8ba (LOCAL_ONLY) 20140611122144 plugins/Macros/Polygon_.txt
  39f7ffcd (LOCAL_ONLY) 20140611122144 plugins/Macros/RGB_Histogram.txt
  3ee0edfa (LOCAL_ONLY) 20140611122144 plugins/Macros/batch_convert_any_to_tif.txt
  6b03bc82 (LOCAL_ONLY) 20140611122235 plugins/Manual_Tracking-2.0.0-SNAPSHOT.jar
  61c19f0a (LOCAL_ONLY) 20140611122235 plugins/MosaicJ_-2.0.0-SNAPSHOT.jar
  ed85ef71 (LOCAL_ONLY) 20140611122235 plugins/Multi_Kymograph-2.0.0-SNAPSHOT.jar
  b80e2dcb (LOCAL_ONLY) 20140611122235 plugins/PIV_analyser-1.1.1-SNAPSHOT.jar
  483fc65c (LOCAL_ONLY) 20140611122235 plugins/PointPicker_-2.0.0-SNAPSHOT.jar
  e75a66e3 (LOCAL_ONLY) 20140611122235 plugins/QuickPALM_-1.1.1-SNAPSHOT.jar
  ffe58c64 (LOCAL_ONLY) 20140611122235 plugins/RATS_-2.0.0-SNAPSHOT.jar
  c7c4c1d6 (LOCAL_ONLY) 20140611122235 plugins/RandomJ_-1.5.1-SNAPSHOT.jar
  c6e020d3 (LOCAL_ONLY) 20140611122235 plugins/Reconstruct_Reader-2.0.0-SNAPSHOT.jar
  e82b5bf0 (LOCAL_ONLY) 20140611122235 plugins/Refresh_Javas-2.0.0-SNAPSHOT.jar
  05fbfed0 (LOCAL_ONLY) 20140611122235 plugins/SPIM_Opener-2.0.0-SNAPSHOT.jar
  412d7708 (LOCAL_ONLY) 20140611122235 plugins/SPIM_Registration-2.0.0-SNAPSHOT.jar
  fbb87e51 (LOCAL_ONLY) 20140611122235 plugins/Samples_-2.0.0-SNAPSHOT.jar
  d5977d8a (LOCAL_ONLY) 20140611122235 plugins/Scala_Interpreter-1.0.2-SNAPSHOT.jar
  b307010c (LOCAL_ONLY) 20140611122144 plugins/Scripts/File/Make_Screencast.bsh
  3d1db56d (LOCAL_ONLY) 20140611122144 plugins/Scripts/File/Open_Samples/Adelsons_Squares.ijm
  60df5674 (LOCAL_ONLY) 20140611122144 plugins/Scripts/File/Open_Samples/Spirals_.ijm
  a3edd6db (LOCAL_ONLY) 20140611122144 plugins/Scripts/Image/Adjust/Scale_to_DPI.js
  209aed52 (LOCAL_ONLY) 20140611122144 plugins/Scripts/Image/Color/Set_Color_By_Wavelength.ijm
  1de6c712 (LOCAL_ONLY) 20140611122144 plugins/Scripts/Image/Hyperstacks/Temporal-Color_Code.ijm
  af064f17 (LOCAL_ONLY) 20140611122144 plugins/Scripts/Plugins/Registration/Correct_3D_drift.py
  a6e496fc (LOCAL_ONLY) 20140611122144 plugins/Scripts/Plugins/Utilities/Create_Desktop_Icon.bsh
  b5ee58a2 (LOCAL_ONLY) 20140611122144 plugins/Scripts/Plugins/Utilities/Find_Jar_For_Class.bsh
  1dee353e (LOCAL_ONLY) 20140611122144 plugins/Scripts/Plugins/Utilities/Fix_Updater.js
  fc46bd40 (LOCAL_ONLY) 20140611122144 plugins/Scripts/Plugins/Utilities/Record_Desktop.py
  9d4d012a (LOCAL_ONLY) 20140611122144 plugins/Scripts/Plugins/Utilities/Record_Window.py
  72fcc6d4 (LOCAL_ONLY) 20140611122235 plugins/Series_Labeler-2.0.0-SNAPSHOT.jar
  091f1e62 (LOCAL_ONLY) 20140611122235 plugins/SheppLogan_-2.0.0-SNAPSHOT.jar
  332f6608 (LOCAL_ONLY) 20140611122235 plugins/Sholl_Analysis-3.4.1.jar
  b3309728 (LOCAL_ONLY) 20140611122235 plugins/Simple_Neurite_Tracer-2.0.2-SNAPSHOT.jar
  afd54eb4 (LOCAL_ONLY) 20140611122235 plugins/Siox_Segmentation-1.0.1-SNAPSHOT.jar
  d2e2e22c (LOCAL_ONLY) 20140611122235 plugins/Skeletonize3D_-1.0.1-SNAPSHOT.jar
  c8f96192 (LOCAL_ONLY) 20140611122235 plugins/Snakuscule_-2.0.0-SNAPSHOT.jar
  0be4dce9 (LOCAL_ONLY) 20140611122235 plugins/SplineDeformationGenerator_-2.0.0-SNAPSHOT.jar
  766dbc3e (LOCAL_ONLY) 20140611122235 plugins/StackReg_-2.0.0-SNAPSHOT.jar
  4b9f0021 (LOCAL_ONLY) 20140611122235 plugins/Stack_Manipulation-2.0.0-SNAPSHOT.jar
  89266d2a (LOCAL_ONLY) 20140611122235 plugins/Statistical_Region_Merging-2.0.0-SNAPSHOT.jar
  cfe79dc6 (LOCAL_ONLY) 20140611122235 plugins/Stitching_-2.0.0-SNAPSHOT.jar
  dd839f73 (LOCAL_ONLY) 20140611122235 plugins/Sync_Win-1.7-fiji2-SNAPSHOT.jar
  c2f7159d (LOCAL_ONLY) 20140611122235 plugins/Thread_Killer-2.0.0-SNAPSHOT.jar
  16243e7e (LOCAL_ONLY) 20140611122235 plugins/Threshold_Colour-2.0.1-SNAPSHOT.jar
  95144bcc (LOCAL_ONLY) 20140611122235 plugins/Time_Stamper-2.0.0-SNAPSHOT.jar
  937a8040 (LOCAL_ONLY) 20140611122235 plugins/ToAST_-25.0.1-SNAPSHOT.jar
  1759061d (LOCAL_ONLY) 20140611122235 plugins/TopoJ_-2.0.0-SNAPSHOT.jar
  423a1e7b (LOCAL_ONLY) 20140611122235 plugins/TrackMate_-2.3.0-SNAPSHOT.jar
  9d624e83 (LOCAL_ONLY) 20140611122235 plugins/Trainable_Segmentation-2.0.0.jar
  6c1aedad (LOCAL_ONLY) 20140611122236 plugins/TrakEM2_-1.0b-SNAPSHOT.jar
  26abe69f (LOCAL_ONLY) 20140611122236 plugins/TrakEM2_Archipelago-2.0.0-SNAPSHOT.jar
  5a73085a (LOCAL_ONLY) 20140611122236 plugins/TransformJ_-2.8.1-SNAPSHOT.jar
  fb96f83a (LOCAL_ONLY) 20140611122236 plugins/TurboReg_-2.0.0-SNAPSHOT.jar
  589a9d99 (LOCAL_ONLY) 20140611122236 plugins/UnwarpJ_-2.0.0-SNAPSHOT.jar
  a32dfe46 (LOCAL_ONLY) 20140611122144 plugins/Utilities/Close_All_Without_Saving.txt
  e0c3235d (LOCAL_ONLY) 20140611122236 plugins/VIB_-2.0.0-SNAPSHOT.jar
  3fe0526d (LOCAL_ONLY) 20140611122236 plugins/Vaa3d_Reader-2.0.0-SNAPSHOT.jar
  cb14f607 (LOCAL_ONLY) 20140611122236 plugins/Vaa3d_Writer-1.0.0.jar
  2304415e (LOCAL_ONLY) 20140611122236 plugins/Video_Editing-2.0.0-SNAPSHOT.jar
  5ce7f6e5 (LOCAL_ONLY) 20140611122236 plugins/View5D_-1.3.1-SNAPSHOT.jar
  5da78224 (LOCAL_ONLY) 20140611122236 plugins/Volume_Calculator-1.0.1-SNAPSHOT.jar
  f78a45e4 (LOCAL_ONLY) 20140611122236 plugins/Volume_Viewer-2.01.1-SNAPSHOT.jar
  04cd0fd6 (LOCAL_ONLY) 20140611122236 plugins/bUnwarpJ_-2.6.1-SNAPSHOT.jar
  5b4deea4 (LOCAL_ONLY) 20140611122236 plugins/bio-formats_plugins-5.0.2.jar
  8b411472 (LOCAL_ONLY) 20140611122236 plugins/blockmatching_-2.0.0-SNAPSHOT.jar
  e9b1f658 (LOCAL_ONLY) 20140611122237 plugins/level_sets-1.0.1-SNAPSHOT.jar
  74de4319 (LOCAL_ONLY) 20140611122238 plugins/mpicbg_-0.6.1.jar
  fcf1ba44 (LOCAL_ONLY) 20140611122238 plugins/panorama_-2.0.0-SNAPSHOT.jar
  5ae49ab0 (LOCAL_ONLY) 20140611122238 plugins/register_virtual_stack_slices-2.0.0-SNAPSHOT.jar
  6af41074 (LOCAL_ONLY) 20140611122238 plugins/registration_3d-2.0.0-SNAPSHOT.jar
  34b7341d (LOCAL_ONLY) 20140611122144 retro/backport-util-concurrent-3.1.jar
  8759ba20 (LOCAL_ONLY) 20140611122144 retro/retrotranslator-runtime-1.2.9.jar
  a6d5a3b2 (LOCAL_ONLY) 20140611122144 retro/retrotranslator-transformer-1.2.9.jar
  d7160d38 (LOCAL_ONLY) 20140611122144 scripts/InstallJava3D.m
  05a92a3c (LOCAL_ONLY) 20140611122144 scripts/IsJava3DInstalled.m
  ff34d026 (LOCAL_ONLY) 20140611122144 scripts/Matlab3DViewerDemo_1.m
  25be149f (LOCAL_ONLY) 20140611122144 scripts/Matlab3DViewerDemo_2.m
  cb529b6c (LOCAL_ONLY) 20140611122144 scripts/Matlab3DViewerDemo_3.m
  53d2da73 (LOCAL_ONLY) 20140611122144 scripts/Matlab3DViewerIntroduction.m
  4bb342fa (LOCAL_ONLY) 20140611122144 scripts/Miji.m
  868cd434 (LOCAL_ONLY) 20140611122144 scripts/Miji_Test.m
  dc94c3a3 (LOCAL_ONLY) 20140611122144 scripts/bfopen.m
  d7e9eb5f (LOCAL_ONLY) 20140611122144 scripts/copytoImg.m
  ed2ff92e (LOCAL_ONLY) 20140611122144 scripts/copytoImgPlus.m
  d42c4c16 (LOCAL_ONLY) 20140611122144 scripts/copytoMatlab.m
Comment 1 Curtis Rueden 2014-06-13 13:26:27 CDT
I can confirm these problems. It's not that JRuby doesn't work at _all_ -- if you run Fiji from the command line you can see the print statement on the console. But output is not being redirected to the graphical log like the other script languages for some reason. And there is something broken with class imports, too, as you point out. We will investigate and fix as soon as we can.
Comment 2 Johannes Schindelin 2014-06-17 16:51:55 CDT
> print "test"

Confirmed. If you have time to fix it, please feel free to work on this (it is a low-priority problem here, unfortunately, because there is only one user bitten by *this* bug).

The idea would be to figure out how to convince JRuby to use our own output writer instead of stdout. We tried this: https://github.com/scijava/scripting-jruby/blob/1df9a4c45a4b368879ff6cfa84a430c264af7fc3/src/main/java/org/scijava/plugins/scripting/jruby/JRubyScriptEngine.java#L95

> echo ij

Cannot work: ij is a package.
Comment 3 Curtis Rueden 2014-06-17 16:52:20 CDT
Johannes pointed out to me that the following works:

 java_import "ij.IJ"
 IJ.log("Hello")

So, you can certainly access the ij.* classes (or whatever Java classes) in this way. Does that address your concern with "ij" etc.? Or are we missing something?

The bug with print echoing to the system console instead of the Script Editor console is real, and we'll need to fix it.
Comment 4 brotkastennation 2014-06-18 08:54:07 CDT
Yes, your script sample does work for me, so I guess it would be possible to to rewrite all scripts and manually import all necessary classes. But I am afraid, possible does not mean feasible here :(

I don't speak Java, but I thought that ij was a simple ruby method, returning an object with a special method_missing method. The error message suggests that this method is not known at all, so the interpreter did not load it. Maybe you can point me to the source code where in ImageJ jruby is loaded? Most likely I will not be able to fix it, but I can have a look.

As it worked before the update, maybe you have an idea what could have caused the trouble? I guess the problem of not printing is part of the new Script Editor, as Johannes has pointed out, but this does not explain the missing ij method, or does it?
Comment 5 brotkastennation 2014-06-19 07:41:47 CDT
In the meantime, in the case you want to circumvent this bug, you can define your own ij method simply by putting these lines in the beginning of your script:
def ij
  Java::Ij
end

And if you require stdout, like mentioned before, IJ.log is working:
def print *args
  ij.IJ.log args.join($, || "")
end

def puts *args
  ij.IJ.log args.join("\n")
end
Comment 6 Johannes Schindelin 2014-06-23 11:23:30 CDT
Okay, I have to admit that even after looking at https://github.com/fiji/fiji/blob/master/plugins/JRuby/imagej.rb (which I understand was included into Fiji's JRuby scripting support by default -- a major violation of consistency with the other scripting languages), I still have no idea where that "ij" comes from.

In ImageJ 1.x, "ij" is a package name. It cannot do anything, it has no code behind it.

There is the class "IJ" in the package "ij". This one can do a lot.

So: render me puzzled as to why it is a bug when Fiji's new scripting support does not know how to execute "ij"...
Comment 7 Curtis Rueden 2014-06-23 16:53:22 CDT
See also this discussion today on #fiji-devel attempting to get to the bottom of the "ij" Ruby issue:

http://code.imagej.net/chatlogs/fiji-devel?times=prefix&start-date=2014-06-23&start-time=0400&end-date=2014-06-24&end-time=0400

Johannes, are you planning to make any changes to address this issue? Or should we close as WONTFIX?
Comment 8 Curtis Rueden 2014-06-23 16:55:27 CDT
*** Bug 782 has been marked as a duplicate of this bug. ***
Comment 9 Johannes Schindelin 2014-06-23 18:23:58 CDT
I am unfortunately not terribly clear what the problem is: Brotkasten's description left me puzzled as to why the described procedure should work. I have no reference where this information came from, whether there are scripts or templates we need to fix, etc. Brotkasten, care to shed some light?
Comment 10 brotkastennation 2014-06-24 05:05:10 CDT
Hopefully this will shed some light:
It's a common pattern in jruby to reference java-classes by a template-method named after the beginning of the java-import-path. So if the java-class is java.lang.System, in jruby one could simply write java.lang.System (compared to java_import "java.lang.System" ; System). By default there are the methods java, javax,  org, and  com available in jruby. And for fiji there was always an ij-method accordingly. Unfortunately I have no idea where in the source-code this is written, but it should be where jruby is initialized. As I have written, "def ij; Java::ij; end" would solve this, it "just" needs to be included in the initialization process.

As for https://github.com/fiji/fiji/blob/master/plugins/JRuby/imagej.rb ,
this is a compatibility library to make jruby behave more like imagej's macro language. I guess it is not used by anyone anymore, as there is no progress in the code even though it would only require basic ruby skills to extend it.

“I have no reference where this information came from”:
I have simply taken information from this wiki-page: http://fiji.sc/JRuby_Scripting
Comment 11 Johannes Schindelin 2014-06-24 07:27:25 CDT
> It's a common pattern in jruby to reference java-classes by a template-method named after the beginning of the java-import-path.

Good. That is the information that was lacking all along. I did not know that about Ruby, did not know that there is such a tight knot between Ruby and Java.

> By default there are the methods java, javax,  org, and  com available in jruby. And for fiji there was always an ij-method accordingly.

So this is comparable to auto-imports, yes? And this is a single auto-import for legacy ImageJ 1.x? That means that ImageJ2, TrackMate, Weka Segmentation, ImgLib2, even TrakEM2 are left out, right? And if we add them, there might be clashes because of less than careful package naming?

I am so far strongly in favor of avoiding this issue by simply asking Ruby users to fix their scripts, because it is a bug to be so fixated on ImageJ 1.x (and then only a part of it anyway).

> “I have no reference where this information came from”:
I have simply taken information from this wiki-page: http://fiji.sc/JRuby_Scripting

You might appreciate the fact that I went hunting in the source code because I had no point to start. And you might appreciate the fact that there are preciously few people working very, very hard to get ImageJ 2.0.0 out of the door. And you might appreciate that I would really have loved to spend this half hour not in vain but on fixing bugs?

So please, for future record, make your report clear, include the relevant pointers, in short: make it as easy as possible for the people you ask to help you. It will be better for both of us.

Back to this issue: as I said, I am strongly in favor of having users fix scripts to be less focused on a single component among the many Fiji has to offer.

There are of course ways to extend the scripting support to run preambles before running the scripts themselves. But this is

- inelegant
- requires additional support in *every single language*
- is not scalable: remember, Fiji is roughly 70x as large as ij.jar.

So I fear that the bug is not that we no longer support the "ij" shortcut. I fear the bug is that we had that shortcut all along.

I'll let this ticket simmer for a bit until it is clearer how to proceed.
Comment 12 brotkastennation 2014-06-24 10:45:44 CDT
First of all, sorry that I was so unclear, I was simply not aware what you know and what not and I didn't know in the beginning what I know now :-)
Thanks a lot for the time you spent on this issue!

Apparently (means I am not sure) there was also a change in jython, as it requires an "import ij" now at the start of scripts. Earlier it was possible to use all ij.*-Classes without an extra import. So I would say, whatever the final decision regarding this auto-imports is, keep them consistent between the languages.

So for this issue, I used the ij-method simply because it was written in the wiki that this is the way to go (and before submitting this bug-report I didn't know any alternative). Take some time to decide about how to handle this, I would update the wiki then accordingly.
Comment 13 Curtis Rueden 2014-08-14 15:57:41 CDT
Reassigning to Mark, since he is working on related issues with Jython caused by uber-JARs. See also https://github.com/fiji/fiji/issues/83
Comment 14 Mark Hiner 2014-08-27 13:34:27 CDT
We added a flexible method for adding headers to scripts based on language (see https://github.com/scijava/scijava-common/pull/116).

This way, there is no magical behind-the-scenes importing: appropriate import statements get added to the top of new files (at the least, as in the case with JRuby, they will point to the file where the imports are declared - imagej.rb for example).

For now, I only added a Ruby header, which requires imagej.rb, which now declares several ij package and subpackage imports.

Note that in JRuby, each import has to be explicitly declared - the package.* notation is not respected. There is a cost to importing additional files, so I just auto-imported what I thought would be useful (ij.IJ, ImagePlus, and such). If I missed anything please let me know.

This is live in the current Fiji.
Comment 15 brotkastennation 2014-08-28 05:08:20 CDT
Sorry, I don't really understand the reason behind this:
»The rationale is that the auto-import feature is not safe. What if two classes of the same name live in two different packages? Or if a new class is introduced that makes formerly unique names ambiguous? All of a sudden, all of the scripts that reference the original class no longer work. In short: auto-imports are dangerously imprecise.«
By using the old ij.thispackage.thisclass syntax, where is an ambiguity with these auto-imports? (so why not put this into imagej.rb?: def ij; Java:ij; end)

Besides this, I think it's not a good idea to default to include the current imagej.rb as it is polluting global namespace heavily (e.g. overwriting open). So I suggest putting all the macro-convenience-functions into a separate module or putting them into another file.
Comment 16 Johannes Schindelin 2014-08-28 05:21:50 CDT
> Sorry, I don't really understand the reason behind this

ImageJ 1.x classes are the vast minority of classes in Fiji by now. If you want to use, say, the classes of the Volume Viewer all the time, you will notice that there is a class called "Line" in the "volumeviewer" package. The same name is used by a class in ij.gui of ImageJ 1.x. You cannot import both.

The way Mark handled the situation solves the problem.

If you feel you can do better, feel free to submit a pull request with an alternative solution that we will then scrutinize with respect to existing setups that we try not to break.
Comment 17 brotkastennation 2014-08-28 08:44:49 CDT
puts Java::ij.gui.Line.object_id
puts Object.const_defined? "Line"
java_import 'fiji.plugin.volumeviewer.Line'
puts Line.object_id
puts Object.const_defined? "Line"
puts Java::fiji.plugin.volumeviewer.Line.object_id
=> 2000
false
2002
true
2002

I still don't see the problem. But please consider the other remark.
[Strangely, running this script twice gives a different result (true, true), is this a bug?]