JRuby

Placing jruby in a subfolder, batch file produces error

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Duplicate
  • Affects Version/s: JRuby 1.0.0RC3, JRuby 1.0.0
  • Fix Version/s: None
  • Component/s: Miscellaneous
  • Labels:
    None
  • Environment:
    Windows XP (latest patches), JRuby 1.0, Java JDK 1.6.0_01
  • Number of attachments :
    0

Description

Placing JRuby under "D:\jruby-1.0.0" works.
If I change the folder to "D:\sw\ruby\jruby-1.0.0" I get sometimes this error when I run my program (e.g. I run it 3 times and it works, the 4th or 5th time it gives this error):

D:\thisisatest\xml>\sw\ruby\jruby-1.0\bin\jruby.bat get_files.rb
Linea in ingresso troppo lunga.
:gotCP
non atteso.

[I translate the messages from italian:
Input line too long.
:gotCP
not expected.
]

Activity

Hide
Vladimir Sizikov added a comment -

I have exactly the same problem on WinVista x64 (jdk 1.6.0_02).

And (I think) I've figured out what's the problem. The problem is termination of JRuby by hitting Control-C and then answering Yes to "Terminate batch job (Y/N)?" question.

When I do that, jruby adds more and more entries to CLASSPATH entry, so after a while the command line entry gets too long, and hence the output error, which is very confusing at first.
(The junk after the main error entry doesn't help either...)

The workaround so far? To answer NO after you hit Control-C!

This is rather visible issue and I hope it will be fixed.

Here's some output on my system when I invoke "echo %CLASSPATH%":

1. first time, no JRuby yet:
.;C:\Program Files (x86)\QuickTime\QTSystem\QTJava.zip

2. After first Control-C:
D:\work\jruby\lib\asm-3.0.jar;D:\work\jruby\lib\asm-commons-3.0.jar;D:\work\jruby\lib\asm-util-3.0.jar;D:\work
\jruby\lib\backport-util-concurrent.jar;D:\work\jruby\lib\bsf.jar;D:\work\jruby\lib\emma.jar;D:\work\jruby\lib
\emma_ant.jar;D:\work\jruby\lib\jarjar-0.7.jar;D:\work\jruby\lib\jline-0.9.91.jar;D:\work\jruby\lib\jna.jar;D:
\work\jruby\lib\jruby.jar;D:\work\jruby\lib\junit.jar;D:\work\jruby\lib\retroweaver-2.0.jar;D:\work\jruby\lib\
retroweaver-rt-2.0.jar;.;C:\Program Files (x86)\QuickTime\QTSystem\QTJava.zip

3. After second Control-C:

D:\work\jruby\lib\asm-3.0.jar;D:\work\jruby\lib\asm-commons-3.0.jar;D:\work\jruby\lib\asm-util-3.0.jar;D:\work
\jruby\lib\backport-util-concurrent.jar;D:\work\jruby\lib\bsf.jar;D:\work\jruby\lib\emma.jar;D:\work\jruby\lib
\emma_ant.jar;D:\work\jruby\lib\jarjar-0.7.jar;D:\work\jruby\lib\jline-0.9.91.jar;D:\work\jruby\lib\jna.jar;D:
\work\jruby\lib\jruby.jar;D:\work\jruby\lib\junit.jar;D:\work\jruby\lib\retroweaver-2.0.jar;D:\work\jruby\lib\
retroweaver-rt-2.0.jar;D:\work\jruby\lib\asm-3.0.jar;D:\work\jruby\lib\asm-commons-3.0.jar;D:\work\jruby\lib\a
sm-util-3.0.jar;D:\work\jruby\lib\backport-util-concurrent.jar;D:\work\jruby\lib\bsf.jar;D:\work\jruby\lib\emm
a.jar;D:\work\jruby\lib\emma_ant.jar;D:\work\jruby\lib\jarjar-0.7.jar;D:\work\jruby\lib\jline-0.9.91.jar;D:\wo
rk\jruby\lib\jna.jar;D:\work\jruby\lib\jruby.jar;D:\work\jruby\lib\junit.jar;D:\work\jruby\lib\retroweaver-2.0
.jar;D:\work\jruby\lib\retroweaver-rt-2.0.jar;D:\work\jruby\lib\asm-3.0.jar;D:\work\jruby\lib\asm-commons-3.0.
jar;D:\work\jruby\lib\asm-util-3.0.jar;D:\work\jruby\lib\backport-util-concurrent.jar;D:\work\jruby\lib\bsf.ja
r;D:\work\jruby\lib\emma.jar;D:\work\jruby\lib\emma_ant.jar;D:\work\jruby\lib\jarjar-0.7.jar;D:\work\jruby\lib
\jline-0.9.91.jar;D:\work\jruby\lib\jna.jar;D:\work\jruby\lib\jruby.jar;D:\work\jruby\lib\junit.jar;D:\work\jr
uby\lib\retroweaver-2.0.jar;D:\work\jruby\lib\retroweaver-rt-2.0.jar;.;C:\Program Files (x86)\QuickTime\QTSyst
em\QTJava.zip

Show
Vladimir Sizikov added a comment - I have exactly the same problem on WinVista x64 (jdk 1.6.0_02). And (I think) I've figured out what's the problem. The problem is termination of JRuby by hitting Control-C and then answering Yes to "Terminate batch job (Y/N)?" question. When I do that, jruby adds more and more entries to CLASSPATH entry, so after a while the command line entry gets too long, and hence the output error, which is very confusing at first. (The junk after the main error entry doesn't help either...) The workaround so far? To answer NO after you hit Control-C! This is rather visible issue and I hope it will be fixed. Here's some output on my system when I invoke "echo %CLASSPATH%": 1. first time, no JRuby yet: .;C:\Program Files (x86)\QuickTime\QTSystem\QTJava.zip 2. After first Control-C: D:\work\jruby\lib\asm-3.0.jar;D:\work\jruby\lib\asm-commons-3.0.jar;D:\work\jruby\lib\asm-util-3.0.jar;D:\work \jruby\lib\backport-util-concurrent.jar;D:\work\jruby\lib\bsf.jar;D:\work\jruby\lib\emma.jar;D:\work\jruby\lib \emma_ant.jar;D:\work\jruby\lib\jarjar-0.7.jar;D:\work\jruby\lib\jline-0.9.91.jar;D:\work\jruby\lib\jna.jar;D: \work\jruby\lib\jruby.jar;D:\work\jruby\lib\junit.jar;D:\work\jruby\lib\retroweaver-2.0.jar;D:\work\jruby\lib\ retroweaver-rt-2.0.jar;.;C:\Program Files (x86)\QuickTime\QTSystem\QTJava.zip 3. After second Control-C: D:\work\jruby\lib\asm-3.0.jar;D:\work\jruby\lib\asm-commons-3.0.jar;D:\work\jruby\lib\asm-util-3.0.jar;D:\work \jruby\lib\backport-util-concurrent.jar;D:\work\jruby\lib\bsf.jar;D:\work\jruby\lib\emma.jar;D:\work\jruby\lib \emma_ant.jar;D:\work\jruby\lib\jarjar-0.7.jar;D:\work\jruby\lib\jline-0.9.91.jar;D:\work\jruby\lib\jna.jar;D: \work\jruby\lib\jruby.jar;D:\work\jruby\lib\junit.jar;D:\work\jruby\lib\retroweaver-2.0.jar;D:\work\jruby\lib\ retroweaver-rt-2.0.jar;D:\work\jruby\lib\asm-3.0.jar;D:\work\jruby\lib\asm-commons-3.0.jar;D:\work\jruby\lib\a sm-util-3.0.jar;D:\work\jruby\lib\backport-util-concurrent.jar;D:\work\jruby\lib\bsf.jar;D:\work\jruby\lib\emm a.jar;D:\work\jruby\lib\emma_ant.jar;D:\work\jruby\lib\jarjar-0.7.jar;D:\work\jruby\lib\jline-0.9.91.jar;D:\wo rk\jruby\lib\jna.jar;D:\work\jruby\lib\jruby.jar;D:\work\jruby\lib\junit.jar;D:\work\jruby\lib\retroweaver-2.0 .jar;D:\work\jruby\lib\retroweaver-rt-2.0.jar;D:\work\jruby\lib\asm-3.0.jar;D:\work\jruby\lib\asm-commons-3.0. jar;D:\work\jruby\lib\asm-util-3.0.jar;D:\work\jruby\lib\backport-util-concurrent.jar;D:\work\jruby\lib\bsf.ja r;D:\work\jruby\lib\emma.jar;D:\work\jruby\lib\emma_ant.jar;D:\work\jruby\lib\jarjar-0.7.jar;D:\work\jruby\lib \jline-0.9.91.jar;D:\work\jruby\lib\jna.jar;D:\work\jruby\lib\jruby.jar;D:\work\jruby\lib\junit.jar;D:\work\jr uby\lib\retroweaver-2.0.jar;D:\work\jruby\lib\retroweaver-rt-2.0.jar;.;C:\Program Files (x86)\QuickTime\QTSyst em\QTJava.zip
Hide
Vladimir Sizikov added a comment -

Also, small addition, in my case, it doesn't matter where the jruby is located, be it on top directory or in deep subdirectory. Sooner or later, I got "the input line is too long" if I get restarting jruby and then do Control-C, "Yes".

The simplest way to reproduce the problem is just invoke "jruby" with no parameters and hit Control-C, and answer "Yes". After five iterations, jruby is not starting anymore due to described problem.

Show
Vladimir Sizikov added a comment - Also, small addition, in my case, it doesn't matter where the jruby is located, be it on top directory or in deep subdirectory. Sooner or later, I got "the input line is too long" if I get restarting jruby and then do Control-C, "Yes". The simplest way to reproduce the problem is just invoke "jruby" with no parameters and hit Control-C, and answer "Yes". After five iterations, jruby is not starting anymore due to described problem.
Hide
Charles Oliver Nutter added a comment -

I'm marking this a dupe of JRUBY-1350, even though it precedes that bug; that one has the correct title and description. We'll fix it.

Show
Charles Oliver Nutter added a comment - I'm marking this a dupe of JRUBY-1350, even though it precedes that bug; that one has the correct title and description. We'll fix it.

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: