[groovy-user] startup error:

163 views
Skip to first unread message

guthrie

unread,
May 20, 2010, 3:33:14 PM5/20/10
to us...@groovy.codehaus.org


I get this error on running groovy:
unexpected error when checking the existence of c:\Program
Files\Java\jre6\bin\client\jvm.dll
22: Invalid argument

But then it continues and compiles and runs fine.
The path is correct.
??
-------------------------------------------
D:\play\groovy>java -version
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)

D:\play\groovy>groovy -v
unexpected error when checking the existence of c:\Program
Files\Java\jre6\bin\client\jvm.dll
22: Invalid argument
Groovy Version: 1.7.2 JVM: 1.6.0_20
--
View this message in context: http://old.nabble.com/startup-error%3A-tp28625930p28625930.html
Sent from the groovy - user mailing list archive at Nabble.com.


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

http://xircles.codehaus.org/manage_email


--
You received this message because you are subscribed to the Google Groups "Groovy Users" group.
To post to this group, send email to groov...@googlegroups.com.
To unsubscribe from this group, send email to groovy-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/groovy-user?hl=en.

Jochen Theodorou

unread,
May 22, 2010, 11:50:32 AM5/22/10
to us...@groovy.codehaus.org
guthrie wrote:
>
> I get this error on running groovy:
> unexpected error when checking the existence of c:\Program
> Files\Java\jre6\bin\client\jvm.dll
> 22: Invalid argument
>
> But then it continues and compiles and runs fine.
> The path is correct.
> ??
> -------------------------------------------
> D:\play\groovy>java -version
> java version "1.6.0_20"
> Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
>
> D:\play\groovy>groovy -v
> unexpected error when checking the existence of c:\Program
> Files\Java\jre6\bin\client\jvm.dll
> 22: Invalid argument
> Groovy Version: 1.7.2 JVM: 1.6.0_20

what do you use to start groovy? a groovy.bat or a groovy.exe?

bye blackdrag

--
Jochen "blackdrag" Theodorou
The Groovy Project Tech Lead (http://groovy.codehaus.org)
http://blackdragsview.blogspot.com/

guthrie

unread,
May 22, 2010, 12:07:21 PM5/22/10
to us...@groovy.codehaus.org



Jochen Theodorou wrote:
>
> guthrie wrote:
>>
>> D:\play\groovy>groovy -v
>> unexpected error when checking the existence of c:\Program
>> Files\Java\jre6\bin\client\jvm.dll
>> 22: Invalid argument
>> Groovy Version: 1.7.2 JVM: 1.6.0_20
>
> what do you use to start groovy? a groovy.bat or a groovy.exe?
>

as above, just "groovy", after a standard (automatic) install.
and although groovy/bin contains both .bat & .exe, I checked and the .exe is
getting run.

--
View this message in context: http://old.nabble.com/startup-error%3A-tp28625930p28644227.html
Sent from the groovy - user mailing list archive at Nabble.com.


Jochen Theodorou

unread,
May 22, 2010, 1:22:23 PM5/22/10
to us...@groovy.codehaus.org
guthrie wrote:
>
>
> Jochen Theodorou wrote:
>> guthrie wrote:
>>> D:\play\groovy>groovy -v
>>> unexpected error when checking the existence of c:\Program
>>> Files\Java\jre6\bin\client\jvm.dll
>>> 22: Invalid argument
>>> Groovy Version: 1.7.2 JVM: 1.6.0_20
>> what do you use to start groovy? a groovy.bat or a groovy.exe?
>
> as above, just "groovy", after a standard (automatic) install.
> and although groovy/bin contains both .bat & .exe, I checked and the .exe is
> getting run.

the move or delete the exe and try running from command line again

bye blackdrag

--
Jochen "blackdrag" Theodorou
The Groovy Project Tech Lead (http://groovy.codehaus.org)
http://blackdragsview.blogspot.com/


Russel Winder

unread,
May 22, 2010, 1:43:58 PM5/22/10
to us...@groovy.codehaus.org, Antti Karanta
On Sat, 2010-05-22 at 17:50 +0200, Jochen Theodorou wrote:
> guthrie wrote:
> >
> > I get this error on running groovy:
> > unexpected error when checking the existence of c:\Program
> > Files\Java\jre6\bin\client\jvm.dll
> > 22: Invalid argument
> >
> > But then it continues and compiles and runs fine.
> > The path is correct.
> > ??

This message is coming from the native launcher, so groovy.exe is being
used. As Jochen points out you can move groovy.exe out of the way and
see if the groovy.bat works.

I do not use Windows so cannot help at all, Antti should be able to do
something next week.

> > -------------------------------------------
> > D:\play\groovy>java -version
> > java version "1.6.0_20"
> > Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
> >
> > D:\play\groovy>groovy -v
> > unexpected error when checking the existence of c:\Program
> > Files\Java\jre6\bin\client\jvm.dll
> > 22: Invalid argument
> > Groovy Version: 1.7.2 JVM: 1.6.0_20
>
> what do you use to start groovy? a groovy.bat or a groovy.exe?
>
> bye blackdrag
>

--
Russel.
=============================================================================
Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel...@ekiga.net
41 Buckmaster Road m: +44 7770 465 077 xmpp: rus...@russel.org.uk
London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder

signature.asc

guthrie

unread,
May 23, 2010, 9:12:29 AM5/23/10
to us...@groovy.codehaus.org


Russel Winder wrote:
>
> This message is coming from the native launcher, so groovy.exe is being
> used. As Jochen points out you can move groovy.exe out of the way and
> see if the groovy.bat works.
>
Thanks.

I see that there 3 launchers in the bin directory from Windows installation;
groovy.exe, groovy (unix launcher), and groovy.bat. The later does some
setup, and then runs startGroovy.bat.

Just typing groovy runs groovy.exe it seems.

I ran all three "by hand", and did a little debugging.

My problem was that I am doing this install on two machines, and had
forgotten to set JAVA_HOME on this one. It seems that the startGroovy.bat
file has a bug in its code to locate java automatically. (Even thought there
is a java on the PATH.) See below for more on his.

So, adding JAVA_HOME and now groovy.bat runs fine. groovy.exe (which is the
file run by just "groovy") fails. But, it means I have to type groovy.bat
every time. Seems like something is wrong in the setup, or I missed
something!

I don't think I can move groovy.exe because I'd assume that groovy.bat, and
grails, ... all use it.

Any hints or ideas why I need to use the .bat startup file?
-------------------------------------------------------------
From groovy.exe:
E:\Plang\Groovy\Groovy-1.6.5\bin>groovy.exe
error: dynamic library c:\Program Files\Java\jre6\bin\server\jvm.dll exists
but could not be loaded!
error (win code 193): (null)
error: could not find client or server jvm under c:\Program Files\Java\jre6
please check that it is a valid jdk / jre containing the desired type
of jvm
-------------------------------------------------------------
groovy.bat failure with trying to detect java_home:

From Groovy.bat: without JAVA_HOME set => odd error
E:\Plang\Groovy\Groovy-1.6.5\bin>groovy.bat
...
E:\Plang\Groovy\Groovy-1.6.5\bin>if not "" == "" goto have_JAVA_HOME
\ActiveState was unexpected at this time.

This may be a known bug - Groovy-3375
"The FOR loop used to search java.exe on the PATH will fail if PATH contains
spaces."
(Pretty odd failure, almost all windows PATHs contain spaces).
This is an old bug report, so I would have guessed that it would be fixed by
now, but maybe not.

-------------------------------------------------------------
--
View this message in context: http://old.nabble.com/startup-error%3A-tp28625930p28649301.html
Sent from the groovy - user mailing list archive at Nabble.com.


guthrie

unread,
May 23, 2010, 9:53:12 AM5/23/10
to us...@groovy.codehaus.org

Ah; got it.

Hmm, the error was actually correct, if not helpful!
---------------------------------------------------------------
A new Windows 7 install,
Groovy Version: 1.6.5 JVM: 1.6.0_17.
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01, mixed mode)

Groovy(.exe) fails:
C:\Users\test>groovy
error: dynamic library c:\Program Files\Java\jre6\bin\server\jvm.dll exists
but could not be loaded!
error (win code 193): (null)
error: could not find client or server jvm under c:\Program Files\Java\jre6
please check that it is a valid jdk / jre containing the desired type
of jvm

Seems to be error: * GROOVY-3655
Does not work with 64-bit JVM on Windows
The launcher is 32-bit, won't work with 64-bit JVM.
(This has been around since last August.)

but groovy.bat works fine.
But, "the native launcher is a native executable replacement for the startup
scripts (groovy.bat, groovy)."
This means that all win-64 bit users have to type groovy.bat every time -
seems like this should at be part of the distribution notes or tutorials.

Why is groovy.bat even distributed?
Well, I suppose I'm glad it is! :-)
--
View this message in context: http://old.nabble.com/startup-error%3A-tp28625930p28649458.html

John Hartnup

unread,
May 23, 2010, 11:28:13 AM5/23/10
to us...@groovy.codehaus.org
I thought Windows would run .BAT in preference to .EXE every time, if
they were in the same directory.


--
"There is no way to peace; peace is the way"

Jochen Theodorou

unread,
May 23, 2010, 12:14:21 PM5/23/10
to us...@groovy.codehaus.org
guthrie wrote:
[...]
> Groovy(.exe) fails:
> C:\Users\test>groovy
> error: dynamic library c:\Program Files\Java\jre6\bin\server\jvm.dll exists
> but could not be loaded!
> error (win code 193): (null)
> error: could not find client or server jvm under c:\Program Files\Java\jre6
> please check that it is a valid jdk / jre containing the desired type
> of jvm
>
> Seems to be error: * GROOVY-3655
> Does not work with 64-bit JVM on Windows
> The launcher is 32-bit, won't work with 64-bit JVM.
> (This has been around since last August.)

I think since a few days we have a 64bit version of the launcher, there
is just not yet a distribution with it.

[...]
> Why is groovy.bat even distributed?

for now it is the default startup way.

ah, yes. about the spaces in path issue. That issue is related to the
usage of bat files. They don't support spaces very well, since there are
form early MS-DOS times without long names and spaces. In the long term
the bat files will be replaced by the exe files

bye blackdrag

--
Jochen "blackdrag" Theodorou
The Groovy Project Tech Lead (http://groovy.codehaus.org)
http://blackdragsview.blogspot.com/


guthrie

unread,
May 23, 2010, 11:09:04 PM5/23/10
to us...@groovy.codehaus.org


Jochen Theodorou wrote:
>
> I think since a few days we have a 64bit version of the launcher, there
> is just not yet a distribution with it.
>
> ah, yes. about the spaces in path issue. That issue is related to the
> usage of bat files. They don't support spaces very well, since there are
> form early MS-DOS times without long names and spaces. In the long term
> the bat files will be replaced by the exe files
>
> bye blackdrag
>
> --
> Thanks for the info and update.
>
> I look forward to access to the 64-bit launcher.
>
> It seems like these issues should at least be better documented - else
> like me users assuem plug-and-play installation.
>
> Best.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
>
>

--
View this message in context: http://old.nabble.com/startup-error%3A-tp28625930p28653390.html
Sent from the groovy - user mailing list archive at Nabble.com.


Antti Karanta

unread,
May 25, 2010, 4:16:58 AM5/25/10
to us...@groovy.codehaus.org


> -----Original Message-----
> From: guthrie [mailto:gut...@mum.edu]
>
>
> Ah; got it.
>
> Hmm, the error was actually correct, if not helpful!

You are right. It's an error message I originally thought no-one would
come across outside development. As I was clearly wrong, I now changed
the error message a little to suggest that the cause may be different
word size in executable and the loaded jvm.


> ---------------------------------------------------------------
> A new Windows 7 install,
> Groovy Version: 1.6.5 JVM: 1.6.0_17.
> java version "1.6.0_17"
> Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
> Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01, mixed mode)
>
> Groovy(.exe) fails:
> C:\Users\test>groovy
> error: dynamic library c:\Program Files\Java\jre6\bin\server\jvm.dll
> exists
> but could not be loaded!
> error (win code 193): (null)
> error: could not find client or server jvm under c:\Program
> Files\Java\jre6
> please check that it is a valid jdk / jre containing the
desired
> type of jvm
>
> Seems to be error: * GROOVY-3655
> Does not work with 64-bit JVM on Windows
> The launcher is 32-bit, won't work with 64-bit JVM.
> (This has been around since last August.)

The issue has been that no-one in the dev team has had access to
64-bit windows. I have asked a couple of times on the mailing list for
volunteers with win-64 to help out a little but there's been no answer.
Thus, we haven't been able to compile a 64-bit windows executable.
Now that the latest release of scons (which we use to build the native
launcher) has working support for 32 -> 64 bit cross compilation (with
visual studio 2008) I am finally able to produce the 64-bit windows
executables. This required no changes to the sources, just minor
adjustments to the build scripts. Quite coincidentally, I sent an email
about this to groovy-dev mailing list just a few days before you brought
up this issue on groovy-user. :)

I just sent the 64-bit executables to Joachim and he will probably
include them in the next windows installer.


> but groovy.bat works fine.
> But, "the native launcher is a native executable replacement for the
> startup scripts (groovy.bat, groovy)."
> This means that all win-64 bit users have to type groovy.bat every
time -
> seems like this should at be part of the distribution notes or
tutorials.

No, just (re)move groovy.exe. Windows will (with the usual settings)
prefer a .exe file to a .bat file, but if there's no .exe it will use
the .bat.
Also, if you are using a 32-bit jvm then the 32-bit groovy.exe will
work fine, even on win-64.


> Why is groovy.bat even distributed?
> Well, I suppose I'm glad it is! :-)

E.g. as a backup for situations like yours. It's a longer discussion
actually - you can look it up on the groovy user mailing list archive
(look for e.g. "native launcher") if you're interested in the details.



::Antti::

Paul King

unread,
May 25, 2010, 5:55:54 AM5/25/10
to us...@groovy.codehaus.org

Hi Antti, for future reference I have access to 64-bit windows.

Cheers, Paul.
Reply all
Reply to author
Forward
0 new messages