Commit 9f2f41e2 authored by Daniel Teske's avatar Daniel Teske

Android: Support non distro installations of JDK

The android tools expect to find java and javac in the PATH. Which
is the case on using the distro java, but isn't if the user
installs Oracle's binary jdk distribution.

Change-Id: Ib5f5448724f00b000a969c27d5aad6a420bfc1eb
Task-number: QTCREATORBUG-14155
Reviewed-by: default avatarBogDan Vatra <bogdan@kdab.com>
parent 9d162bdb
......@@ -471,8 +471,12 @@ FileName AndroidConfig::adbToolPath() const
Environment AndroidConfig::androidToolEnvironment() const
{
Environment env = Environment::systemEnvironment();
if (!m_openJDKLocation.isEmpty())
if (!m_openJDKLocation.isEmpty()) {
env.set(QLatin1String("JAVA_HOME"), m_openJDKLocation.toUserOutput());
Utils::FileName binPath = m_openJDKLocation;
binPath.appendPath(QLatin1String("bin"));
env.prependOrSetPath(binPath.toUserOutput());
}
return env;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment