Linux pycharm.sh PYCHARM_JDK & JDK_HOME issue
if non PYCHARM_JDK nor JDK_HOME vairables are not set pycharm.sh will not launch and reports following error:
ERROR: cannot start PyCharm.
No JDK found to run PyCharm. Please validate either PYCHARM_JDK or JDK_HOME points to valid JDK installation
Changing following code in bin/pycharm.sh
to:
could lead to fewer installation problems, the same solution is used in PhpStorm
ERROR: cannot start PyCharm.
No JDK found to run PyCharm. Please validate either PYCHARM_JDK or JDK_HOME points to valid JDK installation
Changing following code in bin/pycharm.sh
if [ -z "$PYCHARM_JDK" ]; then
PYCHARM_JDK=$JDK_HOME
if [ -z "$PYCHARM_JDK" ]; then
echo ERROR: cannot start PyCharm.
echo No JDK found to run PyCharm. Please validate either PYCHARM_JDK or JDK_HOME points to valid JDK installation
fi
fi
to:
if [ -z "$PYCHARM_JDK" ]; then
PYCHARM_JDK=$JDK_HOME
if [ -z "$PYCHARM_JDK" ]; then
if [ -f "/usr/bin/Java" ]; then
PYCHARM_JDK=/usr
else
echo ERROR: cannot start PyCharm.
echo No JDK found to run PyCharm. Please validate either PYCHARM_JDK or JDK_HOME points to valid JDK installation
fi
fi
fi
could lead to fewer installation problems, the same solution is used in PhpStorm