Issue1269

classification
Title: windows jython.bat fails in 2.5b2
Type: Severity: normal
Components: Core Versions: 2.5b1
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: otmarhumbel Nosy List: blauhase, fwierzbicki, otmarhumbel, r_walter
Priority: urgent Keywords:

Created on 2009-03-09.11:31:02 by r_walter, last changed 2009-03-11.13:50:56 by otmarhumbel.

Files
File name Uploaded Description Edit Remove
issue1269.log otmarhumbel, 2009-03-09.12:53:20 sample installation and start on windows
1269-patch otmarhumbel, 2009-03-10.17:30:27
issue1269-fixed.log otmarhumbel, 2009-03-10.17:51:45
Messages
msg4203 (view) Author: Roland Walter (r_walter) Date: 2009-03-09.11:31:01
The jython.bat delivered with jython 2.5b2 fails. I only get the output
from the java-VM what commandline parameter java understands.

I fear the handling of shell variables is not ok, i.e.:
echo %CLASSPATH% before the call of java with all arguments gave me:

c:\jython2.5b2\jython.jar;"=

echo %_JAVA_OPTS% gave me (german Windows XP):


ECHO ist ausgeschaltet (OFF).
msg4204 (view) Author: Oti Humbel (otmarhumbel) Date: 2009-03-09.12:53:19
Roland,

it works for me (see attached .log file).
Please let me know how you start it, and what goes wrong.
You might want to rem out the two @echo off lines (line 1 and line 8) in
jython.bat
msg4205 (view) Author: (blauhase) Date: 2009-03-09.13:20:12
Hello, had the same problem
fixed with (Line 163?)

if not defined _BOOT_CP set CLASSPATH="%_CP:"=%;%CLASSPATH:"=%"

surrounded the CLASSPATH-value with ""
msg4206 (view) Author: Oti Humbel (otmarhumbel) Date: 2009-03-09.13:45:34
Many thanks for the suggested fix !

Could you please provide a reproducible example of how it goes wrong ?

Sorry for being very carefully concerning quoting, but it is from
painful experience...
msg4207 (view) Author: Oti Humbel (otmarhumbel) Date: 2009-03-09.13:49:43
here is the output of the two relevant lines (with echo on):

C:\stuff\jython\jython 2.5b2>if not defined _BOOT_CP set
CLASSPATH=C:\stuff\jython\jython 2.5b2\jython.jar;.;C:\Program
Files\Java\jre1.6.0_07\lib\ext\QTJava.zip

C:\stuff\jython\jython 2.5b2>"C:\Program Files\Java\jre6\bin\java" 
-Xss512k  -Dpython.home="C:\stuff\jython\jython 2.5b2"
-Dpython.executable="C:\stuff\jython\jython 2.5b2\jython.bat" -classpath
"C:\stuff\jython\jython 2.5b2\jython.jar;.;C:\Program
Files\Java\jre1.6.0_07\lib\ext\QTJava.zip" org.python.util.jython

quoting might not be perfect, but working.
So I would be glad to see a not working example.
msg4208 (view) Author: (blauhase) Date: 2009-03-09.14:06:50
I call jython on my win32 box:
(I echo the line 164, marked with '*>>' )


Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\jython\jython2.5b2\bin>jython
*>>java  -Xss512k  -Dpython.home="C:\jython\jython2.5b2"
-Dpython.executable="C:\jython\jython2.5b2\bin\jython.bat" -classpath
"C:\jython\jython2.5b2\jython.jar;"=" org.python.util.jython
Usage: java [-options] class [args...]
           (to execute a class)
   or  java [-options] -jar jarfile [args...]
           (to execute a jar file)

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

    -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

C:\jython\jython2.5b2\bin>
msg4209 (view) Author: (blauhase) Date: 2009-03-09.14:11:39
And now jython 2.5b2 unchanged (outofthebox):
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\jython\jython2.5b2x>jython
Usage: java [-options] class [args...]
           (to execute a class)
   or  java [-options] -jar jarfile [args...]
           (to execute a jar file)

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

    -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

C:\jython\jython2.5b2x>

I hope this all helps
msg4210 (view) Author: (blauhase) Date: 2009-03-09.14:15:36
And how I installed my jython:

rem Install Jython
rem
set PACK=packages/jython_installer-2.5b2.jar
set JAVA_HOME=C:\dev\java\jdk1.5.0_17
set JAVA_BIN=%JAVA_HOME%\bin
set PATH=%JAVA_BIN%;%PATH%
java -jar %PACK%
msg4211 (view) Author: Oti Humbel (otmarhumbel) Date: 2009-03-09.14:20:50
Now i got it - thanks - this helps a lot !

The error occurs if the environment variable CLASSPATH is not set at all.

Workaround could be:
  set CLASSPATH=.
(or to any reasonable value)

Huh, old bug discovered so late...

I need some time to fix this (empty-test CLASSPATH, and do the quoting
right).

thanks again,
Oti
msg4215 (view) Author: Oti Humbel (otmarhumbel) Date: 2009-03-10.17:30:27
fix is attached in 1269-patch (as a svn diff),
and checked in with revision 6086.
msg4216 (view) Author: Oti Humbel (otmarhumbel) Date: 2009-03-10.17:51:45
attached in issue1269-fixed.log is the output of some manual testing
with and without the --boot option, and with and without environment
variable CLASSPATH set.
msg4218 (view) Author: (blauhase) Date: 2009-03-11.09:58:47
IT WORKS: Thank you!
Jython 2.5b3 (Release_2_5beta3:6092, Mar 10 2009, 15:34:57)
[Java HotSpot(TM) Client VM (Sun Microsystems Inc.)] on java1.5.0_17
Type "help", "copyright", "credits" or "license" for more information.
>>>
msg4219 (view) Author: Roland Walter (r_walter) Date: 2009-03-11.10:57:07
The jython 2.5b3 works. Thank you.

I think someone may close this issue now.
msg4220 (view) Author: Oti Humbel (otmarhumbel) Date: 2009-03-11.13:50:55
blauhase, r_walter, fwierzbicki: thank you all for testing / verifying!
Oti.

now closing as fixed ...
History
Date User Action Args
2009-03-11 13:50:56otmarhumbelsetstatus: open -> closed
resolution: fixed
messages: + msg4220
2009-03-11 10:57:08r_waltersetmessages: + msg4219
2009-03-11 09:58:48blauhasesetmessages: + msg4218
2009-03-10 17:51:47otmarhumbelsetfiles: + issue1269-fixed.log
messages: + msg4216
2009-03-10 17:30:27otmarhumbelsetfiles: + 1269-patch
messages: + msg4215
2009-03-10 01:58:11fwierzbickisetnosy: + fwierzbicki
2009-03-09 14:21:38otmarhumbelsetpriority: urgent
2009-03-09 14:20:51otmarhumbelsetmessages: + msg4211
2009-03-09 14:15:36blauhasesetmessages: + msg4210
2009-03-09 14:11:39blauhasesetmessages: + msg4209
2009-03-09 14:06:51blauhasesetmessages: + msg4208
2009-03-09 13:49:43otmarhumbelsetmessages: + msg4207
2009-03-09 13:45:35otmarhumbelsetmessages: + msg4206
2009-03-09 13:20:13blauhasesetnosy: + blauhase
messages: + msg4205
2009-03-09 12:54:04otmarhumbelsetassignee: otmarhumbel
2009-03-09 12:53:20otmarhumbelsetfiles: + issue1269.log
nosy: + otmarhumbel
messages: + msg4204
2009-03-09 11:31:02r_waltercreate