Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Axis 2 can't see JAVA_HOME on my Mac (soapUI and wsdl2java)

Question : Why can Axis 2 not see where Java home is? Have I set it incorrectly?

Summary : I'm attempting to use Axis 2 with soapUI to generate Java objects from a wsdl on my Mac. However, I get the error "You must set the JAVA_HOME variable before running Axis2 Script."

If I type echo $JAVA_HOME into the command line, it says

/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

I've navigated to the JavaVirtualMachines folder and the jdk is indeed there.

I also have edited ~/.bash_profile to say

export JAVA_HOME=$(/usr/libexec/java_home)

like image 278
Andy A Avatar asked Dec 05 '25 06:12

Andy A


2 Answers

Another solution would be to start SOAP UI from the terminal as your .profile will be already loaded.

open -a /Applications/SoapUI-x.x.x.app/

like image 147
Farouk Avatar answered Dec 07 '25 07:12

Farouk


Are you launching SoapUI by clicking on an icon? In that case, SoapUI wouldn't necessarily have access to environment variables set in your bash startup scripts.

Take a look at this question and this one about setting environment variables so that they're accessible to GUI apps. Basically, you may have to modify some system-wide configuration files.

like image 43
Kenster Avatar answered Dec 07 '25 08:12

Kenster



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!