Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the used java version of SoapUI?

Tags:

java

linux

soapui

I have multiple Java versions installed. I switch versions when needed.
If I use Java 8 as default, SoapUI will use it. A Popup with with this error will show then :

java.lang.UnsupportedClassVersionError: com/eviware/soapui/SoapUI has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0

Since the 5.6.0, SoapUI need a Java version ⩾ 9. So I want to specify the java version used by SoapUI when my default version is java 8.

Notes :
By default I mean, the version printed when : java -version is executed on the Terminal.

like image 470
Belkasmi Avatar asked Oct 09 '20 09:10

Belkasmi


People also ask

How do I change java to SoapUI?

SoapUI ships jre along with its installer and SOAPUI_HOME/bin/soapui. bat has the reference for the same. If you want to use external jdk other than default, then have backup of soapui. bat and edit the file to set your java home.

What version of java does SoapUI use?

SoapUI now uses Java 1.8.

Does SoapUI use java?

SoapUI is java based, so it runs on most operating systems, We test it on several Windows Versions as well as Mac and the multiple Linux dialects. SoapUI requires a 1.6+ version of the JRE (Java Runtime Environment), at least 1 GB of memory is recommended, and about 100 MB of disk space.

What is the latest version of SoapUI?

SoapUI Open Source 5.7. 0.


Video Answer


2 Answers

In the file SoapUI-5.6.0/bin/SoapUI-5.6.0 :

  1. Uncomment the var INSTALL4J_JAVA_HOME_OVERRIDE at the beginning of the file
  2. Assign the java home (JRE OU JDK) to INSTALL4J_JAVA_HOME_OVERRIDE

Example :
INSTALL4J_JAVA_HOME_OVERRIDE=/usr/lib/jvm/jre-11/

like image 119
Belkasmi Avatar answered Nov 06 '22 07:11

Belkasmi


I leave here my solution since i lost 4 hours just to understand that if you have java 8 and you use Ubuntu, you can save the world but SoapUI 5.6.0 won't work.

So the solution is to download an older version, like 5.4.0

Don't bother looking for one if you're an Ubuntu lady/guy, just use this command:

$ wget https://s3.amazonaws.com/downloads.eviware/soapuios/5.4.0/SoapUI-5.4.0-linux-bin.tar.gz

Then unzip and untar the downloaded archive:

$ gunzip SoapUI-5.4.0-linux-bin.tar.gz
$ tar xvf SoapUI-5.4.0-linux-bin.tar

Finally start SoapUI by entering in the folder where it is installed and run:

/bin/soapui.sh
like image 29
Hegyi Levente Avatar answered Nov 06 '22 05:11

Hegyi Levente