PHPStorm upgrade in (OpenSuse) Linux and Java

I don't find any minimum requirements for the new PHPStorm 2.0 I just  downloaded. I would expect it to run with the same JAVA settings as 1.02 but it  gives me the error:

> phpstorm2
ERROR: cannot start WebIde.

No JDK found to run WebIde. Please validate either WEBIDE_JDK, JDK_HOME or JAVA_HOME points to valid JDK installation.

Press Enter to continue.


When I check the environment variable that I have set and java version:

> set |grep JAVA_HOME
JAVA_HOME=/usr/lib64/jvm/jre
> /usr/lib64/jvm/jre/bin/java -version
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)


Could someone explain what is wrong here or tell me what is the java environment that is expected since version 2? The old version keeps working without a problem in the same environment. Why the change?

0
2 comments

It's JRE, not JDK, startup script checks for the tools.jar which is missing in your JRE. It's recommended to install Sun JDK 1.6.0_24 and configure WEBIDE_JDK to point to its location.

Here is how the verification is performed:

if [ -z "$WEBIDE_JDK" ]; then
  WEBIDE_JDK=$JDK_HOME
  if [ -z "$WEBIDE_JDK" -a -e "$JAVA_HOME/lib/tools.jar" ]; then
    WEBIDE_JDK=$JAVA_HOME
  fi
  if [ -z "$WEBIDE_JDK" ]; then
    # Try to get the jdk path from java binary path
    JAVA_BIN_PATH=`which java`
    if [ -n "$JAVA_BIN_PATH" ]; then
      JAVA_LOCATION=`readlink -f $JAVA_BIN_PATH | xargs dirname | xargs dirname | xargs dirname`
      if [ -x "$JAVA_LOCATION/bin/java" ]; then
        WEBIDE_JDK=$JAVA_LOCATION
      fi
    fi
  fi
  if [ -z "$WEBIDE_JDK" ]; then
    echo ERROR: cannot start WebIde.
    echo No JDK found to run WebIde. Please validate either WEBIDE_JDK, JDK_HOME or JAVA_HOME points to valid JDK installation.
    echo
    echo Press Enter to continue.
    read IGNORE
    exit 1
  fi
fi

0

Well I had java-1.6.0-sun installed alright, but what I did not know is that the tools part is not in this package.
Almost by chance I discovered that you also need the java-1.6.0-sun-devel package for it to work.
It would be good to build up some documentation of PHPStorm's dependencies in the different Linux distributions or deliver it from your own yum or apt repository to make live easier.

0

Please sign in to leave a comment.