Re: Small issue with modeler.bat (Win98)

From: Mike Kienenberger (mkienen..laska.net)
Date: Fri Oct 29 2004 - 09:59:22 EDT

  • Next message: Mike Kienenberger: "Re: transient relations"

    Albert <look..treamyx.com> wrote:
    > I'm just starting to learn Cayenne (1.1, R2). Running modeler.bat on
    > win98, I need to change the line :
    >
    > start "CayenneModeler" "%JAVACMD%" -cp "%CLASSPATH%;%DEFAULT_CLASSPATH%"
    > %MAIN_CLASS% %*
    >
    > (removing "CayenneModeler") to :
    >
    > start "%JAVACMD%" -cp "%CLASSPATH%;%DEFAULT_CLASSPATH%" %MAIN_CLASS% %*
    >
    > Else, I get "Bad command or file name".
    >
    > Running on Win XP is fine with modeler.bat unchanged. I suppose windows
    > 'start' works differently between os.

    I'm the one that introduced that problem.

    http://objectstyle.org/jira/secure/ViewIssue.jspa?key=CAY-99

    I hadn't realized it broke on Windows 9x/ME.

    Unfortunately, that change is needed to support spaces in the %JAVACMD%
    under the Windows NT shell (NT/ 2000/XP).

    Windows NT (2000 or XP) takes the first argument to be the window title if
    it's quoted.
    So start "%JAVACMD%" doesn't work.
    But if it's unquoted -- start %JAVACMD% -- then spaces aren't handled
    properly in the path, and, since java is installed by default in "Program
    Files", that breaks most installations.

    I'm not certain what a good fix would be yet.

    I'd rather see the default behavior to support NT-based shells, but at
    minimum we can add a note in the file for Windows 9x/ME users or we can
    create a separate 9x bat file.

    Perhaps I can figure out a way to identify which version of the start
    command to run.

    I've reopened and reassigned issue CAY-99 to myself (as my first official
    act as a committer) and I've appended Albert's comments to it. Albert, if
    you want, you can go to the issue and assign yourself as a watcher for this
    issue.

    -Mike



    This archive was generated by hypermail 2.0.0 : Fri Oct 29 2004 - 09:58:10 EDT