paul paul - 21 days ago 8
Java Question

Launching SOAP UI via terminal not working, gives "java; not found"

I have downloaded java8 and then created a folder "java" in "/usr/local". Later I set the JAVA_HOME and PATH using export.

echo $JAVA_HOME
output
/usr/local/java/jdk1.8.0_20

Now, when I open terminal and type
java -version
it prompts to choose any package from below to install java. But when I do
$JAVA_HOME/bin/java -version
it gives

java version "1.8.0_20-ea"
Java(TM) SE Runtime Environment (build 1.8.0_20-ea-b23)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b22, mixed mode)


and when I run

sh /home/SOAPUI_HOME/soapui-4.0.1/bin/soapui.sh
gives

================================
=
= SOAPUI_HOME = /home/SOAPUI_HOME/soapui-4.0.1
=
================================
/home/SOAPUI_HOME/soapui-4.0.1/bin/soapui.sh: 141: /home/SOAPUI_HOME/soapui-4.0.1/bin/soapui.sh: java: not found

Answer

SoapUI doesn't use JAVA_HOME in its launcher .sh files. You could add /usr/local/java/jdk1.8.0_20/ before java on line 141 (if you are using SoapUI 4.0.1, but I would suggest to upgrade to 5.0.0, then it's line 72).

Another solution would be to to make sure your java installation is the PATH variable.

Third, and easiest in my opinion, is to download the installer version of SoapUI. It is a .sh file which installs both SoapUI and Java.