James
James

Reputation: 45

A call to JRuby brings up java options menu

When I run jruby.exe on the command line or any of the other ruby executables such as rake, bundle etc., it prints the java help message (as below) as if I have simply executed java on the command line.

I dont know how this started to happen. As everything seemed to be operating fine on Friday. I have checked my PATH variable, JRUBY_OPTS variable and everything is setup correctly. Please if anyone understands why this is occurring and how I can rememedy this it would be greatly appreciated. I have been at it for hours with no success.

Example:

cmd> rake

Usage: java [-options] class [args...]
       (to execute a class)
   or  java [-options] -jar jarfile [args...]
       (to execute a jar file)

where options include:
-server       to select the "server" VM
-hotspot      is a synonym for the "server" VM  [deprecated]
              The default VM is server.

-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
              A ; separated list of directories, JAR archives,
              and ZIP archives to search for class files.
-D<name>=<value>
              set a system property
-verbose[:class|gc|jni]
              enable verbose output
-version      print product version and exit
-version:<value>
              require the specified version to run
-showversion  print product version and continue
-jre-restrict-search | -jre-no-restrict-search
              include/exclude user private JREs in the version search
-? -help      print this help message
-X            print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
              enable assertions
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
              disable assertions
-esa | -enablesystemassertions
              enable system assertions
-dsa | -disablesystemassertions
              disable system assertions
-agentlib:<libname>[=<options>]
              load native agent library <libname>, e.g. -agentlib:hprof
                see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
              load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
              load Java programming language agent, see java.lang.instrument

-splash:<imagepath>
              show splash screen with specified image

Upvotes: 0

Views: 238

Answers (2)

Brent
Brent

Reputation: 1488

In my case (Windows) I removed the trailing / from the end of my JAVA_HOME and JRUBY_HOME and this made jruby work. After this the options stop printing out.

Upvotes: 0

James
James

Reputation: 45

A Windows Update seems to have solved the issue. This is no longer occuring.

Upvotes: 1

Related Questions