Change your bat to cd to the directory and then execute the zap.bat file.
Best regards.
On 29/11/2022 12:59,
sonawan...@gmail.com wrote:
> Hello
>
> Thank you for investigating further, i agree the same behavior i also
> observed.
>
> @ZAP Team
> How to handle this - i guess some correction in zap.bat file is required.
>
> (as of now i have supplied full path in zap.bat file and its working but
> need to work on fixed solution)
>
> On Monday, November 28, 2022 at 6:59:58 PM UTC+5:30
jiu3...@gmail.com wrote:
>
>> Hello.
>>
>> I've copied your script and place the bat file in the same directory
>> as zap-2.12.0.jar file. When I launch the bat file from inside of the
>> same directory, it works fine. But I launch the bat file from outside of
>> the directory by specifying the full path of bat file, the message of
>> "Error: Unable to access jarfile zap-2.12.0.jar" is displayed and failed to
>> launch ZAP.
>>
>>
>> ---------------------------------------------------------------------------
>> 久保 由仁(KUBO, Yoshihito)
>>
jiu3...@gmail.com
>> ---------------------------------------------------------------------------
>>
>>
>> 2022年11月28日(月) 22:05
sonawan...@gmail.com <
sonawan...@gmail.com>:
>>
>>> Hello
>>>
>>> Thank you for quick response,
>>>
>>> As you can see - in my batch file, I am not passing any path for .JAR file
>>>
>>> also When i manually start *C:\Program Files\OWASP\Zed Attack
>>> Proxy\zap.bat* file (or open zap application) it works perfect - means
>>> there is no issue with Java version as well...
>>>
>>> The error appears only when i try to run above batch file
>>>
>>> (I am on latest version 2.12.0 --- on earlier version same file used to
>>> work without any issue)
>>>
>>> On Monday, November 28, 2022 at 6:23:57 PM UTC+5:30
jiu3...@gmail.com
>>> wrote:
>>>
>>>> Hello
>>>>
>>>> Error of "unable to access jarfile" raised for various kinds of
>>>> reasons. Typical reason is that specification of jar file is invalid. Try
>>>> to specify the path of zap-2.12.0.jar by full path.
>>>>
>>>>
>>>> ---------------------------------------------------------------------------
>>>> 久保 由仁(KUBO, Yoshihito)
>>>>
jiu3...@gmail.com
>>>>
>>>> ---------------------------------------------------------------------------
>>>>
>>>>
>>>> 2022年11月28日(月) 21:40
sonawan...@gmail.com <
sonawan...@gmail.com>:
>>>>
>>>>> Hello
>>>>>
>>>>> I am having one small bat file to start zap but now I am getting one
>>>>> weird issue
>>>>>
>>>>>
>>>>> *java
>>>>> -Dwebdriver.chrome.logfile=C:\Users\user\Desktop\owasp\automation\chromedriver.log
>>>>> -jar zap-2.12.0.jar -port 8084 -config api.key=8uhfd4rrlmune7mveoedc7ckfm
>>>>> -config scanner.attackOnStart=true -config view.mode=attackError: Unable to
>>>>> access jarfile zap-2.12.0.jar*
>>>>>
>>>>> *------------------------------------------------------------------------------------------------*
>>>>> *The content of bat file is - *
>>>>>
>>>>> echo "Invoking OWASP ZAP"
>>>>> Start cmd.exe /k "C:\program Files\owASP\Zed Attack Proxy\zap.bat"
>>>>> -port 8084 -config api.key=8uhfd4rrlmune7mveoedc7ckfm -config
>>>>> scanner.attackOnStart=true -config view.mode=attack
>>>>> echo "OWASP ZAP Started Successfully"
>>>>>
>>>>>
>>>>> --------------------------------------------------------------------------------------------------------------------------
>>>>>
>>>>> I tried running it with Elevated Access as well, still it threw same
>>>>> error
>>>>>
>>>>> (chrome and chromedrivers are compatible with each other)
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "OWASP ZAP User Group" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to
zaproxy-user...@googlegroups.com.
>>>>> To view this discussion on the web visit
>>>>>
https://groups.google.com/d/msgid/zaproxy-users/e72e909f-d258-4a0a-a5ec-ce86acd7cd19n%40googlegroups.com
>>>>> <
https://groups.google.com/d/msgid/zaproxy-users/e72e909f-d258-4a0a-a5ec-ce86acd7cd19n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "OWASP ZAP User Group" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an
>>> email to
zaproxy-user...@googlegroups.com.
>>>
>> To view this discussion on the web visit
>>>
https://groups.google.com/d/msgid/zaproxy-users/2114bc03-93f1-4d36-b2e2-b06b7ab9ead0n%40googlegroups.com
>>> <
https://groups.google.com/d/msgid/zaproxy-users/2114bc03-93f1-4d36-b2e2-b06b7ab9ead0n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>
>