英文:
How to change the used java version of SoapUI?
问题
我安装了多个Java版本。在需要时我会切换版本。
如果我将Java 8用作默认版本,SoapUI将使用它。然后会显示一个带有以下错误的弹出窗口:
java.lang.UnsupportedClassVersionError: com/eviware/soapui/SoapUI已由Java Runtime的更新版本编译(类文件版本为53.0),而此版本的Java Runtime仅能识别高达52.0的类文件版本
自从5.6.0版本以后,SoapUI需要Java版本≥9。因此,当我的默认版本为Java 8时,我想要指定SoapUI使用的Java版本。
注:
我所说的默认版本是指在终端上执行java -version
时打印出的版本。
英文:
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.
答案1
得分: 11
在文件 SoapUI-5.6.0/bin/SoapUI-5.6.0
中:
- 在文件开头取消注释变量
INSTALL4J_JAVA_HOME_OVERRIDE
- 将 Java 主目录(JRE 或 JDK)分配给
INSTALL4J_JAVA_HOME_OVERRIDE
示例:
INSTALL4J_JAVA_HOME_OVERRIDE=/usr/lib/jvm/jre-11/
英文:
In the file SoapUI-5.6.0/bin/SoapUI-5.6.0
:
- Uncomment the var
INSTALL4J_JAVA_HOME_OVERRIDE
at the beginning of the file - Assign the java home (JRE OU JDK) to
INSTALL4J_JAVA_HOME_OVERRIDE
Example :
INSTALL4J_JAVA_HOME_OVERRIDE=/usr/lib/jvm/jre-11/
答案2
得分: 1
我在这里留下我的解决方案,因为我花了4个小时才明白,如果你使用的是Java 8并且在Ubuntu上使用,你可以拯救世界,但SoapUI 5.6.0不起作用。
所以解决方案是下载一个更旧的版本,比如5.4.0。
如果你是一个Ubuntu的用户,不要费力去寻找,只需使用以下命令:
$ wget https://s3.amazonaws.com/downloads.eviware/soapuios/5.4.0/SoapUI-5.4.0-linux-bin.tar.gz
然后解压缩下载的存档:
$ gunzip SoapUI-5.4.0-linux-bin.tar.gz
$ tar xvf SoapUI-5.4.0-linux-bin.tar
最后,在安装它的文件夹中输入以下命令启动SoapUI:
/bin/soapui.sh
英文:
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
答案3
得分: 0
解决方案:我在SoapUI-5.6.0中设置了INSTALL4J_JAVA_HOME_OVERRIDE变量:
INSTALL4J_JAVA_HOME_OVERRIDE="/usr/lib/jvm/java-11-openjdk-amd64/"
只需使用nano或gedit等工具进行修改(如果需要,不要忘记使用提升的权限)。
最好的祝愿。
英文:
in case it helps anyone - I have java-11 alongside java-8 (with latter being the default) and SoapUI-5.6.0.
Solution: I've set the INSTALL4J_JAVA_HOME_OVERRIDE variable in SoapUI-5.6.0 to:
> INSTALL4J_JAVA_HOME_OVERRIDE="/usr/lib/jvm/java-11-openjdk-amd64/"
Just use nano or gedit, etc. to modify (don't forget to use elevated permissions, if neccessary).
Best regards
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论