jruby-launcher icon indicating copy to clipboard operation
jruby-launcher copied to clipboard

Windows: jruby appear to pass unknown java option when JRUBY_HOME is set

Open headius opened this issue 9 years ago • 0 comments

(From jruby/jruby#3610 by @rob99)

C:\scripts>set JRUBY_HOME=c:\downloads\jruby-9.0.4.0
C:\scripts>jruby -v Usage: java [-options] class [args...](to execute a class) or java [-options] -jar jarfile [args...](to execute a jar file) where options include: -d32 use a 32-bit data model if available -d64 use a 64-bit data model if available

snip...

C:\scripts>set JRUBY_HOME= C:\NotBackedUp\brownr12\scripts>jruby -v jruby 9.0.4.0 (2.2.2) 2015-11-12 b9fb7aa Java HotSpot(TM) 64-Bit Server VM 24.71-b01 on 1.7.0_71-b14 +jit [Windows 7-amd64]

The problem seems to relate to the trailing \ character in the path. If you specify the same JRUBY_HOME without the trailing slash, it works correctly. This behavior only appears to affect Windows (or perhaps only systems with backslash as path delimiter).

@enebo had a theory that it may be causing problems with C string escapes.

I have no theory.

headius avatar Aug 18 '16 18:08 headius