Skip to content
Snippets Groups Projects
Commit dad7cd8d authored by juanf's avatar juanf
Browse files

SSDM-1805 Print nicer error message when trying to run openBIS installer with java 1.6 or earlier

SVN: 33987
parent fdb1d8a2
No related branches found
No related tags found
No related merge requests found
#!/bin/bash #!/bin/bash
#Detect Java version
if type -p java; then
_java=java
else
echo "Java not available"
fi
if [[ "$_java" ]]; then
version=$("$_java" -version 2>&1 | awk -F '"' '/version/ {print $2}')
if [[ "$version" > "1.6" ]]; then
echo Java version $version found.
else
echo Java version $version found is under the required 1.7.
exit -1
fi
fi
#Continue installation
# #
# reads the 'admin' user password from the console # reads the 'admin' user password from the console
# #
......
#!/bin/bash #!/bin/bash
#Detect Java version
if type -p java; then
_java=java
else
echo "Java not available"
fi
if [[ "$_java" ]]; then
version=$("$_java" -version 2>&1 | awk -F '"' '/version/ {print $2}')
if [[ "$version" > "1.6" ]]; then
echo Java version $version found.
else
echo Java version $version found is under the required 1.7.
exit -1
fi
fi
#Continue installation
BASE=`dirname "$0"` BASE=`dirname "$0"`
if [ ${BASE#/} == ${BASE} ]; then if [ ${BASE#/} == ${BASE} ]; then
BASE="`pwd`/${BASE}" BASE="`pwd`/${BASE}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment