Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
66 lines (54 sloc) 1.19 KB
#!/bin/sh
paths="
/usr/lib/jvm/java-8-oracle
/usr/lib/jvm/java-7-openjdk
/usr/lib/jvm/java-7-openjdk-amd64
/usr/jdk/instances/jdk1.7.0
/usr/jdk/instances/jdk1.6.0
/usr/lib/jvm/java-6-sun
/usr/lib/jvm/java-6-openjdk
/usr/lib/jvm/java-6-openjdk-amd64
/usr/jdk/instances/jdk1.5.0
/usr/lib/jvm/java-5-sun"
if [ -r /etc/default/idea ]
then
. /etc/default/idea
fi
if [ -z "$JDK_HOME" ]
then
for path in $paths
do
if [ -x $path/bin/java ]
then
JDK_HOME=$path
break
fi
done
fi
if [ -z "$JDK_HOME" ]
then
echo "Could not find a suitable JDK installation amongst:" >/dev/stderr
for path in $paths
do
echo $path >/dev/stderr
done
echo "Either install a JDK in one of those locations or configure JDK_HOME in /etc/default/idea:" >/dev/stderr
exit 1
fi
echo "JDK_HOME=$JDK_HOME"
export JDK_HOME
if [ -z "$IDEA_VM_OPTIONS" ]
then
if [ -r "$HOME/.idea.vmoptions" ]
then
IDEA_VM_OPTIONS="$HOME/.idea.vmoptions"
export IDEA_VM_OPTIONS
else
if [ -r "/etc/intellij-idea/idea.vmoptions" ]
then
IDEA_VM_OPTIONS="/etc/intellij-idea/idea.vmoptions"
export IDEA_VM_OPTIONS
fi
fi
fi
exec /usr/share/jetbrains/intellij-idea/bin/idea.sh "$@"
Something went wrong with that request. Please try again.