On Fri, Jan 9, 2009 at 5:42 PM, Scot P. Floess <[email protected]> wrote:
>
> Uh yeah...
>
> Your JAVA_HOME should point to /usr/local/jdk1.6.0_11
>
Well, I tried this:
System.setProperty("java.home", "/usr/local/jdk1.6.0_11");
Project project = new Project();
...
project.executeTarget(project.getDefaultTarget());
And when doing an echo in the build.xml like this:
<echo message="${java.home}" />
It was set to the right path, but I still got the same error. It turns
out that I can't execute ant programatically in a maven2 unit test due
to its funky classloader and classpath - which is how I was testing
it. I tried just about everything, and it just doesn't work in that
environment. I can run the same code in a servlet just fine, so I just
have to live without unit tests. It took me a while to isolate the
issue but I finally got there. Thanks for the the help everyone.
- R
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]