.exe stub doesn't run JRuby on Windows XP

I just installed JRuby 1.7.0 on a 32-bit Windows XP computer. It seems
to work, but only if I either
a) call jruby.exe with its fully qualified pathname; or
b) call jruby.bat (which calls jruby.exe with its fully qualified
pathname).

If it matters, I have JRuby installed not on C: but in X:\JRuby, which
has always worked in the past. I have JRE and JDK version 1.7.0-b147.

That is really mysterious. It almost sounds like you have a directory
‘jruby’ in your path and it is trying to execute the directory.

-Tom

On Tue, Oct 23, 2012 at 3:13 PM, Eric C.
[email protected] wrote:

http://xircles.codehaus.org/manage_email


blog: http://blog.enebo.com twitter: tom_enebo
mail: [email protected]

On Tue, Oct 23, 2012 at 4:12 PM, Thomas E Enebo [email protected]
wrote:

That is really mysterious. It almost sounds like you have a directory
‘jruby’ in your path and it is trying to execute the directory.

It is mysterious! If I were to try to execute a directory, I would get
“‘foo’ is not recognized as an internal or external command, operable
program or batch file.” When I execute unqualified jruby or jruby.exe,
I get just one blank line displayed, before the prompt returns.

On Tue, Oct 23, 2012 at 4:25 PM, Eric C.
[email protected] wrote:

On Tue, Oct 23, 2012 at 4:12 PM, Thomas E Enebo [email protected] wrote:

That is really mysterious. It almost sounds like you have a directory
‘jruby’ in your path and it is trying to execute the directory.

It is mysterious! If I were to try to execute a directory, I would get
“‘foo’ is not recognized as an internal or external command, operable
program or batch file.” When I execute unqualified jruby or jruby.exe,
I get just one blank line displayed, before the prompt returns.

I see my default PATHEXT variable puts .EXE before .BAT; changing it
to put .BAT first allowed it to pick up the batch file, which worked.
But the executable should still probably be able to run without a full
pathname.

Eric -

So it’s finding a JRuby somewhere you’re not expecting it to, right?

Try running this script in Ruby or JRuby, and see what JRuby’s it finds,
ok?:

  • Keith

Yeah my PATHEXT has .EXE before .BAT and it executes .EXE. Perhaps we
need some attrib on the .exe or the .dll? That still does not explain
things since it runs when you use the full path. It seems like
somehow it cannot find it in your path at all. The fact it can find
.BAT and not .EXE seems to imply something XP does not like about the
exe, but what that is I don’t know :slight_smile:

-Tom

On Tue, Oct 23, 2012 at 4:44 PM, Eric C.
[email protected] wrote:

[email protected] wrote:



blog: http://blog.enebo.com twitter: tom_enebo
mail: [email protected]

On 2012-10-23, at 23:12, Thomas E Enebo [email protected] wrote:

That is really mysterious. It almost sounds like you have a directory
‘jruby’ in your path and it is trying to execute the directory.

JRUBY-6960 fixes an issue just like that.


Uwe K.
[email protected]

On Tue, Oct 23, 2012 at 7:10 PM, Thomas E Enebo [email protected]
wrote:

Yeah my PATHEXT has .EXE before .BAT and it executes .EXE. Perhaps we
need some attrib on the .exe or the .dll? That still does not explain
things since it runs when you use the full path. It seems like
somehow it cannot find it in your path at all. The fact it can find
.BAT and not .EXE seems to imply something XP does not like about the
exe, but what that is I don’t know :slight_smile:

-Tom

I wish I knew! Like I said, if I execute the .EXE with full pathname,
it runs. Here’s another wrinkle I just discovered:

X:\JRuby\bin>.\jruby.exe
Cannot find class org/jruby/Main.
Exception in thread “main” java.lang.NoClassDefFoundError:
org/jruby/Main
Caused by: java.lang.ClassNotFoundException: org.jruby.Main
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)

Keith, thanks for the gist. Here’s what it found:

X:/JRuby/bin/jruby.bat
X:/JRuby/bin/jruby.exe

On Tue, Oct 23, 2012 at 7:10 PM, Thomas E Enebo [email protected]
wrote:

Yeah my PATHEXT has .EXE before .BAT and it executes .EXE. Perhaps we
need some attrib on the .exe or the .dll? That still does not explain
things since it runs when you use the full path. It seems like
somehow it cannot find it in your path at all. The fact it can find
.BAT and not .EXE seems to imply something XP does not like about the
exe, but what that is I don’t know :slight_smile:

-Tom

I moved a JRuby install to /z/jruby-1.7.0 and updated my PATH and it
still works for me. If you do not see the .dll non-executable or
something similar I am at a complete loss.

-Tom

blog: http://blog.enebo.com twitter: tom_enebo
mail: [email protected]