-J-cp option mistakes classpath argument for Ruby script argument
-----------------------------------------------------------------

                 Key: JRUBY-2937
                 URL: http://jira.codehaus.org/browse/JRUBY-2937
             Project: JRuby
          Issue Type: Bug
          Components: Interpreter
    Affects Versions: JRuby 1.1.3
         Environment: Intel, RHEL 5, Java 1.6.0_07, jruby 1.1.3 -and- Intel, 
Windows 2008 Server, Java 1.6.0_06, jruby 1.1.3
            Reporter: Chris Jeris
            Priority: Minor


The JRuby option -J-cp should pass a -cp option to the underlying JVM, but 
instead the argument following -J-cp seems to be interpreted as the name of a 
Ruby script, even if the -J-cp option is suffixed by -- :

$ jruby -J-cp /usr/local/glassfish/lib/sqljdbc.jar script/server
:1: /usr/local/glassfish/lib/sqljdbc.jar:1: Invalid char `\3' ('') in 
expression (SyntaxError)
$ jruby -J-cp /usr/local/glassfish/lib/sqljdbc.jar -- script/server
:1: /usr/local/glassfish/lib/sqljdbc.jar:1: Invalid char `\3' ('') in 
expression (SyntaxError)

C:\testapp> jruby -J-cp C:\Sun\SDK\lib\sqljdbc.jar script\server
:1: C:\Sun\SDK\lib\sqljdbc.jar:1: Invalid char `\3' ('') in expression 
(SyntaxError)
C:\testapp> jruby -J-cp C:\Sun\SDK\lib\sqljdbc.jar -- script\server
:1: C:\Sun\SDK\lib\sqljdbc.jar:1: Invalid char `\3' ('') in expression 
(SyntaxError)

Workaround is to set CLASSPATH, which is not feasible in all cases for me, or 
to drop the jar in question into $JRUBY_HOME/lib, which works fine.

Bug posted as requested by headius in #jruby on 2008 Aug 19.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to