Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
rob99 opened this issue Jan 20, 2016 · 5 comments
Closed
Milestone

Comments

@rob99
Copy link

rob99 commented Jan 20, 2016

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]
@headius
Copy link
Member

headius commented Feb 14, 2016

Looks like it's passing the -v to the JVM rather than passing it into JRuby's argument processing.

@headius headius added this to the JRuby 9.1.1.0 milestone Apr 20, 2016
@headius headius modified the milestones: JRuby 9.1.1.0, JRuby 9.1.2.0 May 11, 2016
@enebo enebo modified the milestones: JRuby 9.1.2.0, JRuby 9.1.3.0 May 23, 2016
@headius
Copy link
Member

headius commented Aug 16, 2016

I was able to reproduce this with our Windows installer:

C:\Users\headius                                                                                               
λ echo %JRUBY_HOME%                                                                                            
%JRUBY_HOME%                                                                                                   

C:\Users\headius                                                                                               
λ jruby -v                                                                                                     
jruby 9.1.2.0 (2.3.0) 2016-05-26 7357c8f Java HotSpot(TM) 64-Bit Server VM 25.51-b03 on 1.8.0_51-b16 +jit [mswin32-x86_64]                                                                                                    

C:\Users\headius                                                                                               
λ set JRUBY_HOME=C:\jruby-9.1.2.0\                                                                             

C:\Users\headius                                                                                               
λ jruby -v                                                                                                     
Usage: java [-options] class [args...]                                                                         

And it does appear to be the executable, rather than the batch file. I guess it's simply a bug in the Windows native launcher.

@enebo
Copy link
Member

enebo commented Aug 16, 2016

@headius try removing the last backslash. I think we have run into this one before...

@headius
Copy link
Member

headius commented Aug 16, 2016

@enebo Ah, that does work. Do you know why having a trailing slash fails? It's very unexpected.

@headius
Copy link
Member

headius commented Aug 18, 2016

I've moved this issue to jruby-launcher and explained the basic problem and workaround at jruby/jruby-launcher#10.

@headius headius closed this as completed Aug 18, 2016
@headius headius modified the milestones: Non-Release, JRuby 9.1.3.0 Aug 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants