projectlibre does not start / java is not detected:
System: Ubuntu 15.04 64 Bit
java -version
Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar
openjdk version "1.8.0_45-internal"
OpenJDK Runtime Environment (build 1.8.0_45-internal-b14)
OpenJDK 64-Bit Server VM (build 25.45-b02, mixed mode)
when I start projectlibre in a shell, I get the following errors:
Java auto-detection...
Checking java
Java version: AVA_TOOL_OPTIONS /usr/bin/projectlibre: Zeile 129: [: AVA: Ganzzahliger Ausdruck erwartet.
NOK, version < 1.6
Checking /usr/lib/jvm/java-1.7.0-openjdk-amd64/bin/java
Java version: AVA_TOOL_OPTIONS /usr/bin/projectlibre: Zeile 129: [: AVA: Ganzzahliger Ausdruck erwartet.
NOK, version < 1.6
Checking /usr/lib/jvm/java-1.8.0-openjdk-amd64/bin/java
Java version: AVA_TOOL_OPTIONS /usr/bin/projectlibre: Zeile 129: [: AVA: Ganzzahliger Ausdruck erwartet.
NOK, version < 1.6
Checking /usr/lib/jvm/java-7-openjdk-amd64/bin/java
Java version: AVA_TOOL_OPTIONS /usr/bin/projectlibre: Zeile 129: [: AVA: Ganzzahliger Ausdruck erwartet.
NOK, version < 1.6
Checking /usr/lib/jvm/java-8-openjdk-amd64/bin/java
Java version: AVA_TOOL_OPTIONS /usr/bin/projectlibre: Zeile 129: [: AVA: Ganzzahliger Ausdruck erwartet.
NOK, version < 1.6
Java not found or incorrect version.
Please install OpenJDK, Oracle JRE 1.6+ or set JAVA_HOME environment variable if it's already installed.
the script /usr/bin/projectlibre fails in line 129 by detecting openjdk 1.8
seems to have something to do with the first output line of "java -version".
Picked up JAVA_TOOL_OPTIONS ...
If I unset this variable with "unset JAVA_TOOL_OPTIONS", projectlibre starts.
Seems to be this variable came in new in Ubuntu 15.04, see also:
http://askubuntu.com/questions/613562/message-on-each-startup-of-java-after-upgrade-to-15-04
https://bugs.launchpad.net/ubuntu/+source/jayatana/+bug/1441487
just change 2 lines in /usr/bin/projectlibre
116 line to
JAVA_VERSION=
cat "$VERSION_FILE" | awk '/^(java|openjdk) version/ { print substr($3, 2, length($3)-2); }'
131 line to
JAVA_IMPL=
cat "$VERSION_FILE" | awk '/^(java|openjdk) version/ { getline; print $1; }'
it expects 'java version' text, but openjdk8 outputs 'openjdk version "1.8.0_51"'