I don't think setting the property as you have done is exactly correct...
At least once the JVM is up and running... I'd definitely set JAVA_HOME
in your environment first...before running...
On Fri, 16 Jan 2009, robert lazarski wrote:
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]
Scot P. Floess
27 Lake Royale
Louisburg, NC 27549
252-478-8087 (Home)
919-754-4592 (Work)
Chief Architect JPlate http://sourceforge.net/projects/jplate
Chief Architect JavaPIM http://sourceforge.net/projects/javapim
Architect Keros http://sourceforge.net/projects/keros
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]