Forum: JRuby .exe stub doesn't run JRuby on Windows XP

Posted by Eric Christopherson (echristopherson)
on 2012-10-23 22:14
(Received via mailing list)
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.
Posted by Thomas E Enebo (Guest)
on 2012-10-23 23:13
(Received via mailing list)
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 Christopherson
<echristopherson@gmail.com> wrote:
>
>     http://xircles.codehaus.org/manage_email
>
>



--
blog: http://blog.enebo.com       twitter: tom_enebo
mail: tom.enebo@gmail.com
Posted by Eric Christopherson (echristopherson)
on 2012-10-23 23:27
(Received via mailing list)
On Tue, Oct 23, 2012 at 4:12 PM, Thomas E Enebo <tom.enebo@gmail.com> 
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.
Posted by Eric Christopherson (echristopherson)
on 2012-10-23 23:45
(Received via mailing list)
On Tue, Oct 23, 2012 at 4:25 PM, Eric Christopherson
<echristopherson@gmail.com> wrote:
> On Tue, Oct 23, 2012 at 4:12 PM, Thomas E Enebo <tom.enebo@gmail.com> 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.
Posted by Uwe Kubosch (donv)
on 2012-10-23 23:53
(Received via mailing list)
On 2012-10-23, at 23:12, Thomas E Enebo <tom.enebo@gmail.com> 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 Kubosch
uwe@kubosch.no
http://kubosch.no/
Posted by Keith B. (keith_b)
on 2012-10-24 01:04
(Received via mailing list)
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?:

https://gist.github.com/3942332

- Keith
Posted by Thomas E Enebo (Guest)
on 2012-10-24 02:11
(Received via mailing list)
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 :)

-Tom

On Tue, Oct 23, 2012 at 4:44 PM, Eric Christopherson
<echristopherson@gmail.com> wrote:
>
>>> <echristopherson@gmail.com> wrote:
>>>>
>>> ---------------------------------------------------------------------
>
>



--
blog: http://blog.enebo.com       twitter: tom_enebo
mail: tom.enebo@gmail.com
Posted by Eric Christopherson (echristopherson)
on 2012-10-24 02:14
(Received via mailing list)
On Tue, Oct 23, 2012 at 7:10 PM, Thomas E Enebo <tom.enebo@gmail.com> 
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 :)
>
> -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
Posted by Thomas E Enebo (Guest)
on 2012-10-24 02:37
(Received via mailing list)
On Tue, Oct 23, 2012 at 7:10 PM, Thomas E Enebo <tom.enebo@gmail.com> 
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 :)
>
> -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: tom.enebo@gmail.com
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.