cancel
Showing results for 
Search instead for 
Did you mean: 

script unable to detect java VM executable

SOLVED
krogold
Regular Contributor

script unable to detect java VM executable

Hello,

 

I use ssh commands through groovy scripts in my project and it works pretty well, but now, I encounter a strange problem.

I want to execute a shell and it does not work, I have in return the following :

1806424 This script was unable to detect the java VM executable. Please set the VM_HOME environment variable or add the 'java' to the executable PATH.  Current VM_HOME is  

So I tried to set the VM_HOME variable to point to the jvm.dll, added it to PATH and I can check with a groovy script that it is properly detected by SOAPUI :

def java_home = context.expand('${#Env#VM_HOME}');
log.info java_home

gives me

Thu Jul 04 09:04:25 CEST 2019: INFO: C:\Program Files\Java\jdk-11.0.3

But still, my ssh command returns the same thing !? current VM_HOME is ''

 

 

This is really annoying, as this step is the third in my testCase, the two former steps launch .sh as well and they work as expected, there is only this, crucial, one that fails

 

Any help would be appreciated

thanks

 

Alexandre

 

1 ACCEPTED SOLUTION

Accepted Solutions
krogold
Regular Contributor

Re: script unable to detect java VM executable

Well,

finally someone could help me (merci Pierre !) and I found the solution :

when I was echoing path directly in the server I could see

/bin:/sbin:/usr/bin:/usr/sbin:/usr/bin/X11:/usr/local/bin:/usr/bin/ejre1.8.0_202/bin

when I was echoing path through SOAP UI and ssh command I could see only

/usr/bin:/bin:/usr/sbin:/sbin

(I don't know if it is possible to set this path in SOAP UI settings ? If anyone knows ...)

anyway, I had to force the path to the wanted value, which can be done using the following command :

export PATH=$PATH:/usr/bin/X11:/usr/local/bin:/usr/bin/ejre1.8.0_202/bin && <my_command>

this works as expected.

 

cheers !  Smiley Very Happy

 

Alex

View solution in original post

1 REPLY 1
krogold
Regular Contributor

Re: script unable to detect java VM executable

Well,

finally someone could help me (merci Pierre !) and I found the solution :

when I was echoing path directly in the server I could see

/bin:/sbin:/usr/bin:/usr/sbin:/usr/bin/X11:/usr/local/bin:/usr/bin/ejre1.8.0_202/bin

when I was echoing path through SOAP UI and ssh command I could see only

/usr/bin:/bin:/usr/sbin:/sbin

(I don't know if it is possible to set this path in SOAP UI settings ? If anyone knows ...)

anyway, I had to force the path to the wanted value, which can be done using the following command :

export PATH=$PATH:/usr/bin/X11:/usr/local/bin:/usr/bin/ejre1.8.0_202/bin && <my_command>

this works as expected.

 

cheers !  Smiley Very Happy

 

Alex

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors