RE: [New Hotness] classpath broken in 3.4.5473

From: Bill Michell (bill.michel..bc.co.uk)
Date: Fri Sep 12 2008 - 10:58:25 EDT

  • Next message: Mike Schrag: "Re: WOLips perspective in a fresh install broken with 3.4.5474"

    Resent - hit Send too early!
     
    My Windows issue doesn't have anything to do with
    /Library/WebObjects/Extensions.
     
    Because of limitations in windows (or at least some versions of
    windows), the .cmd file in the application's directory that launches the
    app for windows limits the length of the command line.
     
    This effectively limits the length of the classpath.
     
    Some old documentation on the Apple website describes the problem, and
    the solution they implemented at the time:
    http://docs.info.apple.com/article.html?artnum=75300
     
    WOBootstrap.jar is their replacement implementation that magically
    shortens the length of the classpath that needs to be passed on the
    command line, since it is calculated at run-time after launch.
     
    The critical few lines from an old woproject-generated {application}.cmd
    file look like this:
    :: Launch the application.
    echo Launching %~n0.
    echo %JAVAEXE% %JVMOPTS% %JAVAARGS% -classpath WOBootstrap.jar
    com.webobjects._bootstrap.WOBootstrap %THEARGS%
    call %JAVAEXE% %JVMOPTS% %JAVAARGS% -classpath WOBootstrap.jar
    com.webobjects._bootstrap.WOBootstrap %THEARGS%

    instead of this:
    :: Create the temporary launch script that will actually invoke the JVM
    using
    :: the processed classpath.
    echo..cho off > %CMDFL%
    ::echo..cho on> %CMDFL%
    set JAVAEXE=%JVM%
    if "%DEBUG%"=="yes" set JAVAEXE=%JDB%
    if "%DEBUG%"=="yes" set JVMOPTS=%JVMOPTS% %JDBOPTS%
    echo echo %JAVAEXE% %JVMOPTS% %JAVAARGS% %CPATHARG% "%CPATH%" %APPCLS%
    %THEARGS% >> %CMDFL%
    echo del /F /Q %LCKFL%>>%CMDFL%
    echo %JAVAEXE% %JVMOPTS% %JAVAARGS% %CPATHARG% "%CPATH%" %APPCLS%
    %THEARGS% >> %CMDFL%
    echo set RETVAL=%%ERRORLEVEL%%>> %CMDFL%
    echo exit /B %%RETVAL%%>> %CMDFL%
     
    I'll send the complete file to you separately.
     
     
     

    --
    Bill Michell
    Development Team Leader, Broadcast Platforms, BBC FM&T (Journalism). 
    

    ________________________________

    From: Mike Schrag [mailto:mschra..dimension.com] Sent: 12 September 2008 15:43 To: woproject-de..bjectstyle.org Subject: Re: [New Hotness] classpath broken in 3.4.5473

    That doesn't help us poor Windows people. Having got my custom build script working, I now see: The command line is still too long for Windows command scripting to process. Please use the SUBPATHS.TXT file to specify a more appropriate set of paths to substitute. Use the longest paths, particularly if they are common, and eliminate any paths in SUBPATHS.TXT that you aren't actually using in your classpath file. Further, eliminate any paths from the classpath file that that you don't really need, e.g. "WOROOT/Library/Java". If that doesn't suffice, pare down command-line arguments as much as you can. Terminating! Press any key to continue . . . The WOBootstrap.jar way was a brilliant workaround for this problem...

    I'm not sure I follow this ... Explain this in terms of exact changes I need to make to ant to do whatever you're recommending. Honestly, I'm totally against /Library/WebObjects/Extensions, anyway.

    ms

    http://www.bbc.co.uk/ This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated. If you have received it in error, please delete it from your system. Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately. Please note that the BBC monitors e-mails sent or received. Further communication will signify your consent to this.



    This archive was generated by hypermail 2.0.0 : Fri Sep 12 2008 - 10:59:12 EDT