Zaproxy: Can't uninstall after old/insecure JRE removed

Created on 21 Apr 2020  路  3Comments  路  Source: zaproxy/zaproxy

I was trying to uninstall the old version of ZAP I had (2.7.0) on Windows 10.

However, attempting to do so through the regular Windows "Add/Remove Programs" UI, resulted in the following error...


Error

No JVM could be found on your system.
Please define EXE4J_JAVA_HOME

to point to an installed 64-bit JDK or JRE or download a JRE from www.java.com.

OK

Checking for java on the command line yields...

java -version
openjdk version "1.8.0_242"
OpenJDK Runtime Environment (build 1.8.0_242-b08)
Eclipse OpenJ9 VM (build openj9-0.18.1, JRE 1.8.0 Windows 10 amd64-64-Bit Compressed References 20200122_564 (JIT enable
d, AOT enabled)
OpenJ9 - 51a5857d2
OMR - 7a1b0239a
JCL - 8cf8a30581 based on jdk8u242-b08)

Most helpful comment

Using Process Monitor, I saw that the uninstall exe was reading from this file...

C:\Program Files\OWASP\Zed Attack Proxy\.install4j\inst_jre.cfg

Opening it I saw...
c:\program files\java\jre1.8.0_171

Saving via Notepad++ prompted switching to an Admin instance in order to have proper permissions to overwrite that file.

I changed the contents to, C:\Program Files\AdoptOpenJDK\jdk-8.0.242.08-openj9

Trying the uninstall again, and it worked fine (successfully uninstalled).

Now to see if I can get v2.9.0 installed ;)

Leaving this for any else who might have the problem

All 3 comments

Setting the EXE4J_JAVA_HOME environment variable does not allow it to be uninstalled either.

Tried and verfied via command line...
$env:EXE4J_JAVA_HOME = "C:\Program Files\AdoptOpenJDK\jdk-8.0.242.08-openj9

...and via the "Advanced System Settings", "Environment Variables", "System Variables" UI.

Using Process Monitor, I saw that the uninstall exe was reading from this file...

C:\Program Files\OWASP\Zed Attack Proxy\.install4j\inst_jre.cfg

Opening it I saw...
c:\program files\java\jre1.8.0_171

Saving via Notepad++ prompted switching to an Admin instance in order to have proper permissions to overwrite that file.

I changed the contents to, C:\Program Files\AdoptOpenJDK\jdk-8.0.242.08-openj9

Trying the uninstall again, and it worked fine (successfully uninstalled).

Now to see if I can get v2.9.0 installed ;)

Leaving this for any else who might have the problem

Thanks for letting us know :)

Was this page helpful?
0 / 5 - 0 ratings