ZAP install directory

80 views
Skip to first unread message

psiinon

unread,
Dec 3, 2013, 7:18:07 AM12/3/13
to zaproxy...@googlegroups.com
Up until now you've needed to run ZAP from the directory its been installed in.
This is a pain, especially if we want to be able to open files with ZAP, as the OS will typically use the directory of the file as the cwd (more on that later;)

I've just checked in a change that should fix this.
You can still start ZAP from the install directory, but if you dont (or rather, if theres not a 'db' and lang' directories under the cwd) then the code will try to figure it out.
You can also override this via a command line option : -installdir

What this means is that the code can no longer assume its being run from where ZAP is installed.
Theres a new call: Constant.getZapInstall() which returns the install directory if you need it.
I _think_ I've fixed all the places in the code that made this assumption, but if you spot any others then let me know.

As a nice side affect it also means that if you just run the ZAP class from your IDE without setting a starting directory then it should now work.

Simon

psiinon

unread,
Dec 3, 2013, 12:18:35 PM12/3/13
to zaproxy...@googlegroups.com
Following on from this (and the main reason for the above change;) ZAP extensions can now specify the file extensions they can handle by extending the http://code.google.com/p/zaproxy/source/browse/trunk/src/org/parosproxy/paros/extension/CommandLineListener.java interface.

So you will now be able to open ZAP with a ZAP session file (the *.session one) and any scripts that are supported (JavaScript, Zest etc).
For ZAP to be shown on the relevant right click menus will require some per OS configuration.
My plan is to implement this in the Windows installer and then document it for linux and Mac OS.

Simon
Reply all
Reply to author
Forward
0 new messages