August 29, 2010 Leave a comment
Long ago, I had setup Openbravo ERP on my Mac that runs Snow Leopard. In short, it wasn’t as easy as a sudo apt-get openbravo 😉
Now, I wanted to get my development environment built using eclipse. Assembling the plug-ins for Mecurial, HQL and the likes was a snap. When I got the point of executing a “compile.complete.deploy”, the compile errored out with two complaints:
1. Cannot find executable “hg”
2. Cannot find JAVA_HOME.
Apparently, ant couldn’t seem to find a java home. On my mac, an “echo $JAVA_HOME” neatly printed out the location, which is /Library/Java/Home. Moreover, I had earlier used ant to install Openbravo itself, which confirms that ant does know where the JAVA_HOME is. So, the problem domain is restricted to within eclipse.
Several search results in google advised the use of eclipse.ini, so that eclipse know which JAVA_HOME to work on, even while it starts up. Nope, it didn’t help.
I also tried using different JRE versions under “Run > External Tools > External Tools Configuration > JRE”, none of which seemed to resolve the issue.
Finally, under the “Environment” tab, I created a JAVA_HOME variable and pointed it to /Library/Java/Home.
Well, compile.complete.deploy was well under its way 🙂