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)
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/
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With