0

I'm using an ANT build script that I've used in previous versions of OSX. Since upgrading to El Capitan I've been getting the following error displayed in the sublime console. JAVA_HOME does exist, but for some reason sublime and only sublime has issue using it:

Error: JAVA_HOME is not defined correctly.
  We cannot execute java
[Finished in 0.0s with exit code 1]

Running the same ANT build script from a terminal window works fine. Was wondering if anyone knew why sublime would be having an issue finding JAVA_HOME

build script I'm attempting to run:

"cmd" : ["ant", "-buildfile", "${project_path}/ant/build/ant_build.xml", "build-and-copy-to-deploy-DEBUG"],
"osx":
{
    "path": "/usr/local/bin"
}

Thanks!

Christopher Larsen
  • 1,375
  • 15
  • 22
  • El Capitan no longer comes with Java pre-installed. Since the build script works in Terminal, I assume you installed Java yourself. Try running `env` (or `printenv`) in Terminal to see whether `JAVA_HOME` is set or why it is no "defined correctly." – idleberg Apr 20 '16 at 08:18
  • Possible duplicate of [Why I am not able to see the JAVA\_HOME path on my MAC OS X 10.11?](http://stackoverflow.com/questions/33046697/why-i-am-not-able-to-see-the-java-home-path-on-my-mac-os-x-10-11) – idleberg Apr 20 '16 at 08:18
  • `env` reveals `JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk/Contents/Home`. I'm also able to run ant scripts via terminal, just not in sublime. These are the same build scripts I've used in previous versions of OSX so seems to be specific to El Capitan and Sublime Text 3. – Christopher Larsen Apr 20 '16 at 16:06

0 Answers0