当我在命令行或任何其他ruby可执行文件(例如rake
,bundle
等)上运行jruby.exe时,它会打印java帮助消息(如下所示),就好像我有只需在命令行上执行java
即可。
我不知道这是怎么发生的。因为周五一切似乎都运转良好。我检查了我的PATH
变量JRUBY_OPTS
变量,所有内容都已正确设置。如果有人理解为什么会发生这种情况以及我如何重新考虑这一点,那将非常感激。我已经好几个小时都没有成功。
示例:
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
答案 0 :(得分:1)
Windows Update似乎解决了这个问题。这已不再发生。
答案 1 :(得分:0)
在我的情况下(Windows),我从/
和JAVA_HOME
的末尾删除了结尾的JRUBY_HOME
,这使jruby起作用了。此后,选项将停止打印。