Reputation: 623
I have installed Charles proxy on my Ubuntu machine.
When it starts it is stuck with the startup window (ie the one with the logo and app name). At the bottom it is saying "Loading Tools".
It is stuck on this. And does not open.
What can I do to stop it getting stuck so I can use the GUI?
Upvotes: 5
Views: 1823
Reputation: 907
From comments: charles3 requries Java 8.
I fixed it by doing the following (Ubuntu 18, Charles installed via apt
):
sudo apt update
sudo apt install openjdk-8-jre
sudo nano /usr/bin/charles3
Edit the file by adding 3 lines before # Launch Charles
:
JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64"
JRE_HOME="$JAVA_HOME/jre"
JAVA="$JAVA_HOME/bin/java"
The file should look like this after the edit:
#!/bin/sh
######################################################################
# Charles Proxy startup script
#
# Find Charles lib directory
if [ -z "$CHARLES_LIB"]; then
CHARLES_LIB="$(dirname "$(readlink -f "$0")")"/../lib
if [ ! -f "$CHARLES_LIB/charles.jar" ]; then
CHARLES_LIB="/usr/lib/charles-proxy3"
fi
fi
if [ ! -f "$CHARLES_LIB/charles.jar" ]; then
echo >&2 "Charles lib directory not found. Looking in $CHARLES_LIB."
exit 1
fi
# Find Java binary
if [ -z "$JAVA_HOME" -a -z "$JRE_HOME" ]; then
hash java 2>^- || { echo >&2 "Charles couldn't start: java not found. Please install java to use Charles."; exit 1; }
JAVA=java
elif [ ! -z "$JAVA_HOME" ]; then
JAVA="$JAVA_HOME/bin/java"
else
JAVA="$JRE_HOME/bin/java"
fi
# Edit: Use Java 8
JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64"
JRE_HOME="$JAVA_HOME/jre"
JAVA="$JAVA_HOME/bin/java"
# Launch Charles
$JAVA -Xmx256M -Dcharles.config="~/.charles3.config" -jar $CHARLES_LIB/charles.jar $*
Upvotes: 6