Menu

Exit code

Help
Anonymous
2011-12-14
2012-09-04
  • Anonymous

    Anonymous - 2011-12-14

    Hello

    Is there a way to get an exit code from java ?

    I am using WH in a batch script (java -jar webharvest_all_2.jar config=)
    and I would like to check if everything worked fine with the variable
    %ERRORLEVEL% but I never get anything, it would be something like :

    setlocal ENABLEEXTENSIONS
    java -jar webharvest_all_2.jar config="list.xml" loglevel=error
    set exitcode = %ERRORLEVEL%
    echo Exitcode: %exitcode%
    

    Thank's

     
  • Anonymous

    Anonymous - 2012-01-04

    java returns an exit code but is only accessible immediatly with the syntax:

    IF ERRORLEVEL 1 GOTO...
    
     

Log in to post a comment.