Starting ZAP from command line

2,084 views
Skip to first unread message

Vitor Meireles

unread,
Apr 25, 2014, 8:23:06 AM4/25/14
to zaproxy...@googlegroups.com

Hi all,

I have two versions of java installed on my workstation but I can't change the jre so it's always pointing to the 1.6.

I wanted then to start ZAP from the command line (I'm on Windows), and typed the following:

MyJava1.7Directory: java -XX:PermSize=256M -jar "C:/PathToZap/zap.jar"org.zaproxy.zap.ZAP

But I have two warnings:

Failed to load language files from C:\javapath1.7\bin\lang
Failed to load jar files from C:\javapath1.7\jdk1.7.0.11\bin\lib

Has anyone already faced this issue?

Thanks for your help,

Vitor

psiinon

unread,
Apr 25, 2014, 8:36:56 AM4/25/14
to zaproxy...@googlegroups.com
cd to the directory where ZAP is installed first - its looking for directories relative to that location.

Cheers,

Simon

thc...@gmail.com

unread,
Apr 25, 2014, 8:52:15 AM4/25/14
to zaproxy...@googlegroups.com
or provide the path to ZAP dir using the command line parameter "-installdir" [1] (requires ZAP version >= 2.3.0), for example:
MyJava1.7Directory: java -XX:PermSize=256M -jar "C:/PathToZap/zap.jar" org.zaproxy.zap.ZAP -installdir C:/PathToZap/


[1] https://code.google.com/p/zaproxy/wiki/HelpCmdline

Best regards.
--
You received this message because you are subscribed to the Google Groups "OWASP ZAP Developer Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zaproxy-devel...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Vitor Meireles

unread,
Apr 25, 2014, 10:09:20 AM4/25/14
to zaproxy...@googlegroups.com

Thanks, I started zap from his directory and it worked.

Thanks :-)

Vitor

Aaron Bryson

unread,
Apr 25, 2014, 1:22:41 PM4/25/14
to zaproxy...@googlegroups.com
I usually cd into the ZAP directory where the zap.jar/exe files (C:\Program Files (x86)\OWASP\Zed Attack Proxy) are located and launch it manually like so:

C:\Program Files (x86)\OWASP\Zed Attack Proxy>javaw -jar zap.jar

I do not know why the ZAP desktop icon never works. It always present a java error.

psiinon

unread,
Apr 28, 2014, 5:44:46 AM4/28/14
to zaproxy...@googlegroups.com
Theres also a zap.bat file in this directory ;)
I've replied to your other thread re the problems starting ZAP via the icon.

Cheers,

Simon

Munkhtur Enkhbold

unread,
Aug 13, 2014, 1:43:51 PM8/13/14
to zaproxy...@googlegroups.com
I tried in windows cmd
c:\Program Files\OWASP\Zed Attack Proxy\java -XX:PermSize=256M -jar zap.jar
Then I get Error org.parosproxy.paros.model.Model - Failed to delete file c:\Users\me\uwasp zap\session\untitled1.data
invalid database address: jdbc:hsqldb:file:C:/Users/me/OWASP ZAP/session/untitled1
Any ideas?

Doodle

unread,
Aug 13, 2014, 3:49:36 PM8/13/14
to zaproxy...@googlegroups.com
I actually figured it out. I had to delete session files. For some reason ZAP had a lock on those files. After rebooting and deleting these files enabled the commands to run properly. Now the only thing is when the scan is kicked off from the command line, it is not going through proxy I sat up in my firefox. If I can somehow make that work with web logins etc from command line that will be awesome.

Arjun Gupta

unread,
Jan 13, 2015, 4:24:30 AM1/13/15
to zaproxy...@googlegroups.com
I am getting the same kind of error on Kali Linux whenever I try to run ZAP from eclipse. Is there any solution to this?

Defaulting ZAP install dir to /root/workspace/zaproxy/lib/zap.jar
Warning: failed to load language files from /root/workspace/zaproxy/lib/zap.jar/lang
Warning: failed to load jar files from /root/workspace/zaproxy/lib/zap.jar/lib
org/apache/commons/logging/Log

thc...@gmail.com

unread,
Jan 13, 2015, 4:29:26 AM1/13/15
to zaproxy...@googlegroups.com
Hi.

Which project was checked out? zaproxy?

Best regards.

Arjun Gupta

unread,
Jan 13, 2015, 4:31:33 AM1/13/15
to zaproxy...@googlegroups.com
Yes I checked out trunk of zaproxy

thc...@gmail.com

unread,
Jan 13, 2015, 4:49:06 AM1/13/15
to zaproxy...@googlegroups.com
Was it checked out from:
zaproxy.googlecode.com/svn/trunk
?

Just want to be sure because there is an inconsistency in the working
copy (i.e. zap.jar in the lib directory).

Best regards.
> --
> You received this message because you are subscribed to the Google
> Groups "OWASP ZAP Developer Group" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to zaproxy-devel...@googlegroups.com
> <mailto:zaproxy-devel...@googlegroups.com>.

Arjun Gupta

unread,
Jan 13, 2015, 4:52:53 AM1/13/15
to zaproxy...@googlegroups.com

thc...@gmail.com

unread,
Jan 13, 2015, 5:01:27 AM1/13/15
to zaproxy...@googlegroups.com
OK, to run ZAP from source you need to check out from zaproxy.googlecode.com

Could you check out from that project and try running it?

Best regards.

On 13/01/15 09:52, Arjun Gupta wrote:
> It is checked out from zap-extensions.googlecode.com/svn
>
> On Tuesday, January 13, 2015 at 3:19:06 PM UTC+5:30, thc202 wrote:
>
> Was it checked out from:
> zaproxy.googlecode.com/svn/trunk
> <http://zaproxy.googlecode.com/svn/trunk>
> > <mailto:zaproxy-devel...@googlegroups.com>.
> > For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>

Arjun Gupta

unread,
Jan 13, 2015, 5:05:11 AM1/13/15
to zaproxy...@googlegroups.com
Thank you. But in the Guide http://www.dinosec.com/docs/Building_ZAP_with_Eclipse_v3.0.pdf . It is mentioned that to create extension in ZAP, you have to check out through zap-extensions.googlecode.com/svn

thc...@gmail.com

unread,
Jan 13, 2015, 5:19:49 AM1/13/15
to zaproxy...@googlegroups.com
Right, but to run ZAP from source you need the other project.

If you don't want (or need) to run ZAP from source you can build the
add-on and then install it in a latest weekly release.

Best regards.

On 13/01/15 10:05, Arjun Gupta wrote:
> Thank you. But in the Guide
> http://www.dinosec.com/docs/Building_ZAP_with_Eclipse_v3.0.pdf . It is
> mentioned that to create extension in ZAP, you have to check out through
> zap-extensions.googlecode.com/svn
> <http://zap-extensions.googlecode.com/svn>
>
> On Tuesday, January 13, 2015 at 3:31:27 PM UTC+5:30, thc202 wrote:
>
> OK, to run ZAP from source you need to check out from
> zaproxy.googlecode.com <http://zaproxy.googlecode.com>
>
> Could you check out from that project and try running it?
>
> Best regards.
>
> On 13/01/15 09:52, Arjun Gupta wrote:
> > It is checked out from zap-extensions.googlecode.com/svn
> <http://zap-extensions.googlecode.com/svn>
> >
> > On Tuesday, January 13, 2015 at 3:19:06 PM UTC+5:30, thc202 wrote:
> >
> > Was it checked out from:
> > zaproxy.googlecode.com/svn/trunk
> <http://zaproxy.googlecode.com/svn/trunk>
> > <http://zaproxy.googlecode.com/svn/trunk
> > > <mailto:zaproxy-devel...@googlegroups.com>.
> --
> You received this message because you are subscribed to the Google
> Groups "OWASP ZAP Developer Group" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to zaproxy-devel...@googlegroups.com
> <mailto:zaproxy-devel...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages